.NET Core - MVC

Observations about .NET Core, MVC and converting YetaWF from ASP.NET MVC5 to .NET Core MVC. The new .NET Core has great new features. Getting there from an existing MVC 5 app is HARD!

Client-Side Versus Server-Side Frameworks

10/31/2017

Client-side JavaScript frameworks have become very popular. Angular, React, Vue, and many others are available to create your state-of-the-art Single Page Application (SPA).

While I consider myself slightly slanted towards server-side development, I'm equally comfortable developing in pure JavaScript, jQuery, and many client-side frameworks. Do I want to work on JavaScript code or a client-side framework? Not really. I find it somewhat tedious and a bit akward. But probably not for the reasons you would expect.

I have developed YetaWF, which is a server-side, data-driven framework that creates Single Page Applications. Obviously, there is quite a bit of JavaScript code involved to pull off a true Single Page Application. (Yes, there is). But it's built into the framework. You don't have to work on client-side code.

So what is a data-driven framework? It means, I can create a simple MVC controller, with a model, pass it to a view and it renders on the client-side. Yes, as a Single Page Application. YetaWF uses the "Module" concept. It's an extra level, which makes it all possible. For example, on this page you're currently reading, there are quite a few modules used. The menu on top of the page is a module. The Login button in the upper right corner of the page is a module. The comments section below, yes, another module. If you scroll all the way down, you'll see a "Scroll-to-top" arrow in the bottom right corner of the page. Another module.

If you click on a link, let's say one of the main menu entries, like "Home", only the modules on the new page are actually replaced, not the entire page. This means about 2 MB of code is not downloaded, or executed, because it's already loaded. jQuery is already present, Kendo UI, is already present (and many more). The menu was already loaded. So was the Scroll-to-top module. That is the true advantage of client-site Single Page Applications.

In other words, with YetaWF, you can basically develop a "plain-old" MVC application, using modules, but still with just models, controllers and views, and magically, you have a Single Page Application.

That means, with some effort, you could convert a plain old MVC application to a Single Page Application, simply by converting to YetaWF. Without rewriting everything in a JavaScript framework. That of course would mean re-architecting and redesigning everything.

Is YetaWF as fast and as efficient as a true client-side framework? Maybe, maybe not, definitely close. But the effort to get to a YetaWF SPA is a fraction of rewriting everything. Even if you're starting from scratch, using the YetaWF approach lets you leverage server-side programming (server-side developers) to get a SPA.

The UI experience with YetaWF may be even deeper than with a client-side only framework. YetaWF uses established components, like jqGrid (the grid control) with sorting, filtering and a deep user experience, which is not yet available in current client-side frameworks. Kendo UI and jQuery-UI also offer established, solid user interface controls, not typically integrated into current JavaScript frameworks.

Yes, using a JavaScript framework is the "cool" thing to do. But will you get there in time before your competitor does? Sometimes the cool new framework isn't the best business decision. Particularly when an established solution using proven technology can get you there faster.

With YetaWF, you also automatically get support for static pages, basically raw (saved) HTML served in response to a page request. Prerendering JavaScript pages for better SEO is a non-issue in YetaWF because page content (ahem, module content) is always rendered on the server. All the SEO and Analytics issues associated with JavaScript frameworks simply don't exist with a server-side SPA like YetaWF.

Server-side Single Page Application. Really? But yes, it's real.

No Comments

Be the first to add a comment!

Add New Comment

Complete this simple form to add a comment to this blog entry.