Keeping it simple MVC

Studying

So I’ve been approached with several questions about web development, development strategies, or some area in between where I end up talking about this demonstration I made about a year ago demonstrating some basic technical and methological concepts.  I wanted to see how quickly I could create an MVC-driven web application using nothing but HTML, ECMA/JavaScript, and AJAX calls.  Took less than a half hour to implement and came out to show a bunch of little demonstrations on how to develop web applications in addition to the MVC demonstration.  (Come to find out, not all developers are privvy to web development like their companies had expected.)  Anyway I’ve been meaning to drop it here for others to see/play with one day.

Basically the model, controllers, and views are all HTML that spits out JSON objects.  Two JS files are used to eval and make the AJAX object.  That’s pretty much it.  The model is the names at the bottom of the index.html page when opened.  The default controller will pop up an alert when the user types something in the text box and leaves the textbox.  Click the Change Controller button to switch controllers instantly.  Then type in the text box and leave focus again.  A different message should appear.  That ends the demonstration.

 Another reason to make this example to prove a point that all of these frameworks being created around the world can be broken down to something this simple and basic — such that entry-level developers don’t get overwhelmed.  Keep it short and simple first.  Then decide which framework works for you, right?

SimpleMvc.zip (8.26 kb)

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.