Tuesday, 14 April 2015

ASP.NET WebForms, why I am dismissing it

stateless is a fundamental property of the internet, why should we consider it wrong or to be fixed.

As we all know, there is a fundamental difference that requires legacy application development and web development to have substantially different architectures.

This fundamental difference is that when you write code to run on a specific machine, you have a state-full condition, while when your write code to run on web-based applications, you have a state-less condition.

With the first condition, normally you take a persistent synchronous approach (at least in most state-full context), while with the state-less condition you would normally take a volatile asynchronous approach.

Building a robust and stable interface with a legacy application is easy enough; users are used to common Windows, dialog boxes, error boxes and so on. And it is easy enough to keep all relevant data in the RAM memory until the application is running. It's easy to force the user take certain actions (wizards, dialog boxes and so on).

However, achieving the same architecture on a web-based application is overly complicated and I believe is wrong; the environment is fundamentally different, so the architecture should follow suit.

ASP.NET WebForms was designed (in my opinion) to allow WinForms developer to quickly shift to WebForms by trying to make the internet a state-full system.
To achieve this, lots of page load is required to keep ViewState data, lots of cookies and session variables have to be used and lots of full page post back are required where few simple AJAX calls could do.
There are AJAX powered controls for ASP.Net web forms, however, the control over the JavaScript is often cumbersome and not complete and you end up with lots of complications and pieces of logic spread all over the project.

I did use WebForms at the beginning, but then I realised that it was not the way to go, the system is state-less and my design and implementation should cater for such a condition.

Microsoft has also shifted focus; WebForms is still alive and supported but not terribly active. From the introduction of MVC model and more support for HTML5 and JavaScript, the focus is being moved to a real web-based environment for real web-applications.

I am sure that a good piece of software, whether is written with WebForms, MVC or any other model, is still good software, however, I believe that the right technology and approach should be used in every project.

Any web-based project will have to be built with the state-less condition in mind; most probably WebForms is not a good approach.

Personally, I have dismissed the use of WebForms almost entirely; I use .Net components for my (SQL) Data and Business Layer (written in C#), ASP.Net as server scripting, HTML5, JavaScript and AJAX for the user interface and presentation layer and to enhance the user experience. Within the use of these tools, there are countless different solutions to explore, many more than the restricted WebForms model.



Please, feel free to comment and share!
;p)

Tuesday, 7 April 2015

cloud computing, fast responses to FAQ

if you've been discussing the cloud, you've probably been asked (or have asked) these questions...

if you have ever been discussing, or reflecting, on the cloud, you have probably asked yourself, or you have been asked, a number of common questions. In my experience and knowledge, the answer should be very brief, however, in many occasion it sparked a long confusing debate sometimes moving all the way to politics (what about our privacy!?!) and conspiracy theories (big brother wants to know more and more...).

Now, I am not here to debate or discuss such topics, if I did, however, I would start with social media and how much information people give willingly (and for free); if I were the big brother I wouldn't have to move an inch.

Getting to the point - here are some frequently asked questions that (in my experience) have triggered some level of debate.

what if the internet goes down?

Well, first of all that's very rare now, especially in big cities. However, sometimes the internet does go down in the work place and when that happens, one way or another, the productivity plunges until connectivity is restored (many phone systems also stop working if internet is down). But these days also at home, an internet outage bothers us quite a bit.

Furthermore, many cloud applications have 'work off-line' modes, that (as the name suggests), allow users to perform a number of options while off-line. Think of all sales reps in remote areas; they are still taking orders no problem, even if there is no mobile coverage. In addition, cloud-based applications have been designed to cope with the temporary off-line situation; most legacy application are not.

And, your connection may be down for the day, but if you have the cloud you can send employees home to work from their connection, what are the chances that they are all down?? You could also use GSM connectivity, probably mobile networks are still working. Basically, there are a number of ways to work around a prolonged internet outage... with the cloud.

One more thing, if you are working on the cloud and your computer crashes you lose no work, ever thought about that?

I do not deny that internet going down is an issue with the cloud, but so is it without cloud. And again, the cloud is never really 'off-line', you can always access it from some place.

what about security?

Your data is probably safer on the cloud, security-wise and back-up wise. Besides, most probably you already have data available on the internet.

A business today must have an e-commerce platform where customers can buy (or at least order), view their bills and history and provide their details for on-line payments. This means that you have a database on line holding your entire stock with prices, promotions discounts etc;  you have an order history for all your clients including their personal and payment information. In addition, you probably have (or are planning to get) a CRM for your sales representatives.

But even if you have no e-commerce platform, but just sales reps and delivery staff working with hand-held devices, laptops or tablets, even if using secured applications, sensitive data must be accessible via the internet.

To cut a long story short, the issue with security is an issue in itself. It has nothing to do with cloud as such; it has to do with the nature of the internet. It is there, cloud or no cloud.

what about privacy?

All I have said for security is true for privacy. It is an issue that is part of the nature of the internet. If you use internet in any way (and everybody does today), you will have to deal with security and privacy issues.



Please, feel free to comment and share!
;p)