Tag Archives: framework

Frameworks in Architecture Definition

There are lot of frameworks which disappeared with time, also there are few frameworks which have changed the way applications are getting developed. These successful frameworks have contributed to give a new look to Java itself. There are many reasons behind continued success of different frameworks available in market. These days Java application development involves considerable use of proven frameworks. Below are some benefits we get by using these frameworks.

* Readymade components to speed up the development
* Developer community support to help
* As all are OpenSource, Everything comes free of cost
* Successfully Proven technology assuring success of project

Now, we will explore the architecture trends arising due to wide usage of these ready frameworks in application development, assuming readers to be aware of different popular Java based open source frameworks e.g. Struts, Spring, Hibernate etc.

Layered Architectures:

Architecture definition involves identifying tiers and further different layers to separate each unit responsibility. Definitely the driver is business requirement, which makes us to separate presentation from business and business from data access. Let us take following simple example where we have three tiers – web tier, business tier and database tier. Each tier has clear responsibility.

Presentation tier also called as web tier handles presentation part along with navigation from one screen to other. Additional features like managing user session, caching information etc. will be additional expected features in presentation tier.

Business tier encapsulates complete business logic. Business validations, processing, calculations etc. gets handled in this layer. Transaction management, security etc. are the enterprise features expected in this layer.

Database tier involves implementation of database interaction and processing of retrieved or to be persisted data. Database session management, transaction propagation etc. are the features expected here.

When we select ready frameworks to implement each of these tiers, different layers in a tier are identified by the selected framework already. We can customize these layer but up to certain extend only.

Predefined Layers with different Frameworks:

The word framework broadly means ready components and skeleton on which we can construct a larger program. Some amount of flexibility is available to choose better alternatives suitable to the application. To explore it further, let us take each tier and try to identify layer alternatives according when we use different framework.

Presentation Layer:

As we move from one framework to other, the type of objects we use go on changing. Here Action, Controller, and Page Components encapsulate navigation logic. This means that when we use these frameworks we have to have a layer that contains everything related to navigation. If you remember the days of servlet, everything related to navigation along with request data extraction and population in data object used to be inside servlet code. Now we get the request data populated in mapped pojos, and what we need to do is identify next navigation point in these action/controller/pagecomponent classes. Framework takes care of rest of the things. Thus we have limited options in this tier with usage of one of these frameworks.

Business Layer:

This layer contains everything related to business. An application might require exposing the business functions as a service, and we decide to use Spring Webservice for this purpose. This implementation will require following simple layers.

Here the first layer just deals with webservice request –response-fault handling including marshaling and un-marshaling, while the second class contains actual business function implementation. These two layer can be clearly indentified in with usage of Spring Webservices.

Database Layer:

In this layer, we take example of hibernate framework which accesses oracle database. We require a Dao (data access object) layer that offers create, read, update and delete (CRUD) operations on data objects (which map to database entities directly).

From the above discussion, we can conclude that each (OpenSource) framework has it’s own requirement of layers, when we select the framework we also identify these layers directly in our architecture. We can leverage little flexibility provided by the framework to customize it according to our needs.

Framework Usage View:

With above preliminary discussion, We can clearly see a need of representation that shows how different frameworks in different tiers interact with each other. Not only interaction but interaction in following context –

* Thread management
* Transaction management
* Data transformation (e.g. if you are using struts then action form is required but it can not be directly passed to hibernate as it requires conversion into object that represents database table.)
* Exception management support
* Individual framework benefits and constraints

This list can be longer depending on application and frameworks considered.


What is NOLOH?

NOLOH is a lightweight, on-demand, distributed, web application development platform with which it is possible to build visually and functionally sophisticated applications that are accessible in a web browser over a network connection.

* Lightweight: NOLOH delivers only the exact code necessary to render each user’s application view state. No extraneous HTML, CSS, or JavaScript code is sent to the browser and the code that is sent is highly obfuscated.
* On-demand: NOLOH generates all client-side code only as it is needed. NOLOH generates client-specific code automatically for each user taking into account the user’s browser, operating system, and other client-side variables. Importantly, NOLOH inherently manages all aspect of a user’s application view state (including client-side garbage collection) freeing the developer from having to manage the communications and protocols between the client and the server.
* Distributed: Users connect to NOLOH applications running on a server using a web browser client via an intranet or the Internet.
* Web application development platform: A platform can be thought of as a set of resources – for example, libraries, classes, structures – that provide both usability and consistency in application development. As might be expected, some platforms provide more resources than others. In particular, NOLOH provides a full suite of resources that enable developers to concentrate on their applications, rather than on the many time-consuming and often annoying aspects of web development. One example of this is the AJAX-like Web 2.0 functionality in the user interface. NOLOH provides this without any additional programming work.

NOLOH consists of:

* A programming language (NOLOH, which extends and enhances PHP)
* A comprehensive complement of classes, methods, and controllers that programmers use to develop NOLOH applications; and
* A lightweight runtime engine (the NOLOH “kernel”) installed on a web server that interprets programs written in NOLOH, manages user state, and generates all of the necessary client-side, and server-side code that the application requires

Summary of NOLOH fundamentals:

* NOLOH: Not One Line Of HTML (or JavaScript).
* NOLOH manages cross-browser compatibility issues so you don’t have to.
* NOLOH provides seamless communication between client and server, thus the distinction between server and client is profoundly blurred
* NOLOH provides an easy and intuitive workflow.
* NOLOH allows flexibility, the developer decides which programming techniques and tools to use.
* NOLOH provides a core of basic classes, functions, procedures, and controllers.
* NOLOH is object-oriented.
* All NOLOH objects (functions, procedures, controllers whether internal or external) are reusable and extendable.
* NOLOH supports inheritance of object properties.
* NOLOH presents the programmer with a single language syntax, PHP, and supports the more verbose Javascript syntax to ease the transition to NOLOH for Javascript programmers who are not versed in PHP.
* Once an object is created on the server it is never thrown away unless explicitly destroyed or the server is restarted.
* NOLOH enables programmers to easily create events in the browser that can post back to the server without the entire page being posted back to the server.
* All events (client and server) are written in NOLOH.
* NOLOH manages all aspects of user view state.
* In NOLOH, the concept of forms does not exist.

Why PHP?

PHP is the fourth most popular programming language and the most popular language for developing web applications. According to Netcraft PHP is installed at over 1.2 million IP addresses hosting over 20 million web sites. There’s also a very large and active community of PHP developers. PHP is an interpreted language so development cycles tend to be faster than with compiled languages like Java. It’s gratifying and efficient to be able to modify and save the code and then just refresh the browser to see the change.

10 Questions to Ask When Choosing a Framework

When do you need a framework and when do you decide to roll your own? Ask yourself the following questions.

  1. What is my target compile and deploy version? In the java world it is very common to have a target version of 1.2. This reduces the number of java frameworks that you may use. This is quite typical of many corporate environments as they take much longer to upgrade various parts of their IT infrastructure.
  2. What functionality do I need at the minimum? If you do not need much functionality, it may not be worth the time to even research frameworks. As a consultant, I saw some firms do a full month-long framework evaluation when they only needed a servlet filter.
  3. Are there “bonus” features that a framework may give us? Some frameworks are large enough to have many more features than you are immediately looking for. Spring is a perfect example of this. You may be looking at Spring for the dependency injection portion, and as a bonus you pick up the MVC features in the framework.
  4. Do we have any knowledge of the framework? In some shops, this is the most important question to ask. If there is no knowledge of the framework, you will spend a lot of time researching its capabilities instead of actually using it. The amount of time spent maintaining code written to use the framework is also much larger than normal.
  5. What is the cost of knowledge gathering and research for the framework? This is a question for the managers reading this post. If the developer needs a month to research the frameworks and determine their suitability, then that is very expensive. This cost is increased when you realize that mostly senior level developers are going to do the evaluations.
  6. What is the cost of developing an internal framework that does the minimal feature set? If you do not need a lot of functionality, is it “simpler” and “cheaper” to roll your own? In many cases you can have a senior level developer design the framework and get help from junior developers for implementation. This also adds to the internal technical knowledge of the team.
  7. How active is the framework community? If you have a question on how to use something, the community forums or blogs of interest are invaluable. If there is a framework user mailing list, look at how many messages are posted and how quickly responses appear. This is your development support team, so you need to have fairly quick response.
  8. Are there consultants readily available if you hit a roadblock? Sometimes companies will have specific expertise in a framework. If the framework is popular, then many consulting firms will have someone with some level of knowledge.
  9. Are there time constraints on the framework decision? Do you need a choice yesterday? If there is little time to make a decision, popularity of the framework becomes important. Popularity will typically give you the answers to a few of the other questions in this list. Also, smaller frameworks are normally simpler and quicker to integrate into your code.
  10. Would multiple smaller frameworks or various best of breed fit better than one monolithic framework? Some people get concerned with a monolithic choice like Spring or .Net. There are a wealth of frameworks available and some have very targeted functionality. For example, SiteMesh is a small framework that allows you to “skin” your website very easily. You can setup a SiteMesh example site and understand what it does within an hour.

What did I miss? Are there any other questions that you think are important?

Flash Catalyst

Adobe Flash Catalyst is a new professional interaction design tool for rapidly creating user interfaces without coding.

  • Create interactive prototypes with the ability to leverage them in the final product.
  • Transform artwork created in Adobe Photoshop and Adobe Illustrator into functional user interfaces.
  • Publish a finished project as a SWF file ready for distribution
  • Work more efficiently with developers who use Adobe Flash Builder4 to create rich Internet applications (RIAs). Designers use Flash Catalyst to create the functional user experience then provide the project file to developers who use Flash Builder to add functionality and integrate with servers and services.

Create the user experience through an approachable interaction design tool for designers with no coding required:

  • No coding required: Create the user experience and make it functional without coding.
  • Sell your ideas: Be able to show a functional design instead of static screenshots to communicate your ideas.
  • Ensure your creative vision is accurately expressed: Design with the expressiveness of Flash Player including graphics, typography and 3D effects.

Rapidly create and deliver a finished SWF file or collaborate more effectively with developers:

  • Fast learning curve: If you can use Photoshop or Illustrator you can quickly learn to use Flash Catalyst.
  • Fast Interaction Design: Transform native Photoshop and Illustrator files into functional user experiences. Publish finished projects for distribution as a SWF file.
  • Collaborate more effectively with developers: Provide Flash Catalyst projects to developers who use Flash Builder to add additional functionality and integrate with servers and services.

Flash Catalyst and Flash Builder are based on the open source Flex 4 framework.