Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Monday, July 5, 2010

MVC Design Pattern

Originated from Smalltalk, MVC stands for Model-View-Controller.

Model:

Denotes the data objects, model comprises of everything that's being modified and presented to the user.

View:

View is the screen representation of the model. The current state of the data objects is presented using this object.

Controller:

Controller defines the way the User Interface reacts o the input given by the user. the data objects (Model) is manipulated using the Controller component.

Benefits of using the MVC:

Reliability(Clear seperation between the presentation and transaction layers)

High reuse and Adaptability(Multiple types of views can be used with the same server-side code)

Very low development and life Cycle costs:(Even low level programmers can develop and maintain the UI)

Rapid Deployment:(Development time can be reduced as UI designers focus)

Tuesday, May 11, 2010

CGI and Advantages Of Java Servlets Over Perl

CGI:

There are two things a Web Server Application alone can't do:
1) Generate Dynamic Content (generating dynamic / on-the-fly web pages)
2) Perform Operations with form Data.
To perform these operations, the web server application uses helper applications.
These helper Applications perform the operations and sends information back to the web server application. (The web server application thinks that the page received is just another static page.)

The non-Java term for the helper application is CGI(Common Gateway Interface).

Most CGI programs were written using Perl and now I would like to bring out the advantages of Java over Perl.
* Java is Performance effective. With Perl, the server has to launch a heavy weight process for each and every request for that resource.
* Now we might get a thought that similarly in Java, each instance of the JVM would be a heavy weight process.
* In our case, Servlets stay loaded only once. Client requests for a servlet resource are handled as seperate Threads of the single running Servlet. We don't have the overhead of starting the JVM and loading the class.
* It can be pointed out that Web servers are able to keep a single Perl program running between clients, but, the point is not all web servers can do that. It's a special case which doesn't apply to all Perl CGI programs.
* Furthermore, Servlets can be a J2EE Client, whereas a Perl CGI Program cannot!

More to be discussed with respect to J2EE Clients.

What's a MIME type

The Content-Type response header's value in the HTTP Response is known as MIME type.
The MIME type tells the browser what kind of data the browser is about to receive so that the browser will know how to render that. The MIME type is any of the types sent in the HTTP Request's "Accept:" Header.

Example:

In the HTTP POST Request, if we have

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/
plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1

Content-Type: text/html
is the possible MIME type sent using the HTTP Response.

Friday, March 5, 2010

Some Beautiful Web UI Options

I was on the look out for interesting and beautiful Web UI libraries for creating Rich Internet Applications, and I came across few options...

I need to explore it further and try out samples...

I would like to list the various options and give a brief idea based upon information collected online.
If readers have come across any of those technologies, they could gladly join in.

1. IT Mill Toolkit (Now Called as Vaadin)
IT Mill Toolkit is an open-source framework, providing widgets and tools for the development of Rich Internet Applications (RIAs). Delivers web applications without worrying about incompatibilities of web browsers, DOM or JavaScript by using standard Java tools.

2. LivePipe UI
LivePipe UI is a suite of high quality widgets and controls for web 2.0 applications built using the Prototype JavaScript Framework. Each control is well tested, highly extensible, fully documented and degrades gracefully for non JavaScript enabled browsers where possible

3. Jitsu
Jitsu contains an integrated set of tools to enable developers to build and deploy sophisticated user interfaces for web applications. These include an Xml markup language, page compiler, data binding engine, JavaScript runtime, control library, runtime inspector, animation engine, cross-platform library, Ajax, and back button support.

4. MochaUI
MochaUI is a web applications user interface library built on the Mootools JavaScript framework.Uses: web applications, web desktops, web sites, widgets, standalone windows and modal dialogs.

5. Echo Web Framework
Echo is an open-source framework for developing rich web applications. From the developer's perspective, Echo behaves as a user interface toolkit--like Swing or Eclipse SWT. AJAX technology is employed to deliver a user experience to web clients that approaches that of desktop-based applications.

6. The Yahoo! User Interface Library (YUI)
The YUI Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX. YUI is available under a BSD license and is free for all uses.

7. WUI Web UI Framework
WUI (Web User Interface) is an MVC framework for writing web UIs in a single language: Java. Write web apps with components, widgets & events, not JSPs. Runs in any servlet 2.3 container. Similar to Model 2 / Struts, only better. Apache-style license.

8. Butterfly Web UI
Butterfly Web UI is a component oriented web framework for Java, like Wicket or Tapestry. The main advantage compared to these frameworks is that Butterfly Web UI integrates naturally with Butterfly DI Container, giving you a state-of-the-art dependency injection container to help you structure and decouple the internal components of your web applications.

Apart from the above, we also have GWT, JQuery and Extjs.

Information is wealth.. Kindly add information for better understanding of readers.
If you have samples, you can mail it to me at
s.its.chandru@gmail.com.
I will ensure, it appears here under your name