Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Sunday, July 18, 2010

Best of this Week Summary 28 June - 18 July 2010

Saturday, January 3, 2009

My clients are getting thicker and thicker: MVC implementation shift

Last week I stumbled over this interesting article on the potentially changing Model View Controller architecture implementations. (Sidenote: here's the more subtle distinction between MVC1 and MVC2 described. And here's an article on the ambiguity of the term and pattern MVC.)
An example logical diagram of MVC2 is shown below:


For quite some years, the general practice was to generate HTML as result of the View, with the browser rendering it and being the thin web client. These days though, more and more the web client is getting heavier ("fatter") because of all the Javascript being used for AJAX, SPI and, in general, more logic on the web client.
The article takes a look at the different approaches to MVC implementations:

  1. the HTML-only approach;

  2. the HTML+Javascript "basic" approach; some of the Model's "business logic" is duplicated on the client;

  3. the "AJAX" approach; partial views can be updated, the view consists of multiple HTML fragments, Javascript creates the View, not the application server;

  4. and the full-blown Javascript-only ("a la gmail") approach; Javascript in the browser creates the views, near-complete responsibility for the Model business rules in the web client (browser), the web client would be the Controller.

The approaches range from, at the one extreme end, the definitive "thin client", and at the other extreme end, the definitive "thick client"." Example frameworks that can easily facilitate the last option are Google Web Toolkit (Java to Javascript) and Pyjamas (Python to Javascript). Below GWT's architecture diagram is displayed. Note the (relatively) limited application server procedures, part of the Model, preferably only performing basic validation, security, etc.


The new MVC2 diagram for the above mentioned fourth approach would look something like this:

Included in the article is also how you could split up work in a team between people working on the View and Model parts.

I do not completely agree with the statement in the beginning of the article that says "The Web client takes care of keystrokes and mouse movements: the Web browser application itself is the Controller". I'm reading this as: the browser is the controller. Though, when you look at the first picture, that is not what the Controller is supposed to be.
But, in general the whole potential movement of going to thick clients is an interesting one to keep an eye on.
Other pros for thicker Javascript-based clients (not mentioned in the article) are:
  • Easier distribution of new versions than in the old days with fat clients like Visual Basic, where you had to make sure all clients got updated;

  • Easy opening up of your SOA webservices. The fat client could directly access them;

  • Easier mashup possibilities at the View layer via Javascript;

  • Potentially a large improvement in scalability: the client processing power is used as much as possible, the application server only performs several basic checks;

  • The Javascript generator/builder takes care of browser compatability.


Several cons are though:
  • Potentially quite significant longer page loading times when the Javascript all has to be loaded at once;

  • If not designed correctly, there could be significant extra network traffic;

  • Being dependent on the Javascript generator/builder when a browser is (not anymore) supported (though an opensource framework allows you to build it yourself if really needed).

Saturday, December 13, 2008

Best of this Week Summary 8 December - 14 December 2008

  • Spring's Web Flow 2 now lets you use JSF as view technology. It addresses a couple of the existing JSF issues and already some features only present in JSF 2.0.

  • Microsoft (yes yes, don't stop reading immediately ;-) has published a How-To Design Using Agile Architecture guide which "will help you start the process of designing your application. It discusses the six main steps you should follow, and then discusses the issues involved in making logical choices. It also provides checklists to help you ensure that the proposed design will meet your requirements", including patterns, best practices and agile considerations. This is a quick summary of the guide.

  • A tiny bit off-track, but still interesting to point out: of course you know Google's GWT, in which you can create a Javascript web front-end application in Java. But now this is also possible in Python (recently releasing version 3) with Pyamas! Pretty cool!

  • Talking about software architecture, how would you document that correctly? Here's a bunch of good tips trying to answer that. It is a good high-level overview of what you should document in an application architecture. Focus is on UML 2.0, but what should be in the documentation is valid for any notation format.

  • Here's the first list (and maybe last :-) I'll post on looking back @ 2008: on overview of what happened with Java in 2008.

Sunday, August 31, 2008

Best of this Week Summary 25 August - 31 August 2008

  • Water & Stone PDF with an analysis of 19 open source content management systems. WordPress, Joomla! and Drupal come out best.

  • Recently released Keyczar is an open source cryptographic toolkit designed to make it easier and safer for developers to use cryptography in their applications. It supports authentication and encryption with both symmetric and asymmetric keys. Keyczar is designed to be open, extensible, and cross-platform compatible. It is not intended to replace existing cryptographic libraries like OpenSSL, PyCrypto, or the Java JCE, and in fact is built on these libraries.

  • How to add custom columns to the association using Hibernate 3.2.5 (and Spring 2.5). Quite unbelievable that this has to be so complex. It's quite simple with a @ManyToMany or similar annotation if you don't want an extra column in the association (link table). But I think it's quite normal that you like to add more columns, for example a timestamp of when the record was created.

  • Great summary of Eric Meyer's talk at An Event Apart San Francisco 2008 about 9 CSS frameworks: 960, Blueprint, Content With Style, That Standards Guy, YAML, YUI, Elements, Tripoli and WYMStyle. In short: CSS templates are a good starting point, but to make the design unique you will very likely have to modify the templates.

Saturday, April 12, 2008

Best of this Week Summary 7 April - 12 April 2008