Search This Blog

Saturday, April 4, 2009

AI & UI - Thinking beyond...

Can we build code that can think on its own?
For example, can we build a component that can learn from the inputs that it gets?
I was trying to build a component that can handle additional events based on user inputs. This component can adapt to user's requirement by changing from a 2d to a 3d component on its own.
UI has come a long way and today's user's expect the UI to hold the data within it and expect the UI to "analyze" this data and display appropriate responses through data visualizations to tell the users what action to take!
Talking about 2d to 3d and vise-versa, I believe the marriage between flare and papervision could create the best of the 2d and 3d worlds!
Building a new component that takes ideas from flare and papervision and has Artificial Intelligence embedded makes it mouth watering!

Original = Light weight = High Performance

The fact of the matter is we as developers look for great open source frameworks and libraries that can make our lives easier.
The vision should always be on scalability and performance but for some reason all these free libraries are making us lose focus on the plain fact that we can build ultimate stuff that can be much better than all these that exist for free.
The problem is using these libraries limit our ability think beyond what exists!
The idea is that by creating a component on our own using simple logic creates unbelievably great stuff! All the actionscript code for 2d, 3d and data visualization are great but there is much more than we see.
All I suggest is enjoy creating stuff than just re-using the "elephants"!!!

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. MIT licensed and actively maintained.

Openings Jobs in Flex, Java, Perl & C Programming

We have some openings for the following positions:

1. Strong in Java/J2EE skills with 1 to 5 yrs experience.
2. Strong C skills with 4-5 yrs experience.
3. JavaScript, AJAX and Adobe Flex with 1-4 yrs experience
4. Strong in Perl or any other scripting language. Should have worked on automated testing. Around 2-4 yrs experience in testing.
5. Designer for creating content (especially icons) for our web application, product and company website. Should be good in Photoshop, Fireworks or any other Image editor and should be very creative.

Location: Bangalore

mail your resumes to: aditya7773@gmail.com

Prototype JavaScript

Prototype is a JavaScript Framework that aims to ease development of dynamic web applications.

http://www.prototypejs.org/

Featuring a unique, easy-to-use toolkit for class-driven development and the nicest Ajax library around, Prototype is quickly becoming the codebase of choice for web application developers everywhere.

prototype.js is a JavaScript library initially written by Sam Stephenson. This amazingly well thought and well written piece of standards-compliant code takes a lot of the burden associated with creating rich, highly interactive web pages that characterize the Web 2.0 off your back.

Developers familiar with the Ruby programming language will notice an intentional similarity between Ruby's built-in classes and many of the extensions implemented by this library. That's not surprising since prototype.js is a spinoff and is directly influenced by the requirements of the Ruby on Rails framework.

As far as browser support goes, prototype.js tries to support Internet Explorer (Windows) 6.0+, Mozilla Firefox 1.5+, Apple Safari 1.0+, and Opera 9+. Supporting these browsers also cause some other browsers that share their rendering engines to be supported as well, like Camino, Konqueror, IceWeasel, Netscape 6+, SeaMonkey, etc.

Flex Data Visualization & Charting

There are some cool open source projects that are creating ripples in flex. I find the best of all to be Flare. Flare is very flexible and light-weight. It provides foundation classes to create ultimate data-visualization components with useful animations, transitions and effects.
There is another such project called BirdEye. This is pretty cool but still not as great as Flare. However the vision of this project is to create an end-to-end solution for data-visualization. Not the fun stuff that developers would like to reuse.

Flare:
Flare is an ActionScript library for creating visualizations that run in the Adobe Flash Player. From basic charts and graphs to complex interactive graphics, the toolkit supports data management, visual encoding, animation, and interaction techniques. Even better, flare features a modular design that lets developers create customized visualization techniques without having to reinvent the wheel.

BirdEye:
BirdEye is a community project to advance the design and development of a comprehensive open source information visualization and visual analytics library for Adobe Flex. The actionscript-based library enables users to create multi-dimensional data visualization interfaces for the analysis and presentation of information.

Have fun with all the cool data-visualization stuff!

Wednesday, September 17, 2008

Spring & HIbernate

Here I would like to recommend the best combination which is Spring with Hibernate for an Enterprise application which confirms to OOPS philosophy.

Before we go in-depth about the topic, some facts about using an ORM:

Advantages:
Speeds-up Development - eliminates the need for repetitive SQL code.
Reduces Development Time.
Reduces Development Costs.
Overcomes vendor specific SQL differences - the ORM knows how to write vendor specific SQL so you don't have to.

Disadvantages:
Loss in developer productivity whilst they learn to program with ORM.
Developers loose understanding of what the code is actually doing - the developer is more in control using SQL.
ORM has a tendency to be slow.
ORM fail to compete against SQL queries for complex queries.

For Hibernate, Spring framework provides first-class support with lots of IoC convenience features, addressing many typical Hibernate integration issues. All of these support packages for O/R (Object Relational) mappers comply with Spring's generic transaction and DAO exception hierarchies. There are usually two integration styles: either using Spring's DAO 'templates' or coding DAOs against plain Hibernate/JDO/TopLink/etc APIs.

Spring framework is based on Java Bean configuration management with Inversion of control principle (IoC). Spring uses its IoC container as the principal building block for a comprehensive solution that reflects all architectural features. Its unique data access system with a simple JDBC framework improves its productivity with less error. Its AOP program written in standard Java provides better transaction management services and also enables it for different applications.

Following are the modules of the Spring Core Container:
Beans, Core, Context, Expression Language

Dependencies are satisfied through the following:

1. Constructor Injection
2. Setter Injection
3. Interface Injection

Configure the spring bean configuration file
Create bean entries for the following:
jsp view resolver, datasource, sessionfactory & other domain specific dao & controller beans.

Hibernate Mapping for the DAO object will be in the .hbm.xml file

Use a seperate DAO class to interact with the database.
Use a MultiActionController class to handle the web requests.
Add hibernate annotations to Bean classes, if you want to add any database related constraints.
Example:

@Id
@GeneratedValue
@Column(name="USER_ID")
public Long getId() {
   return id;
}

Ensure all DAO classes implement an interface so that save & retrieve methods can be implemented on them.
Use Hibernate Template to access the database in the DAO object.
this.hibernateTemplate = new HibernateTemplate(sessionFactory);
hibernateTemplate.saveOrUpdate(user);
return hibernateTemplate.find("from User");

Hibernate Template is thread safe and reusable. You need not manually open and close Session, Hibernate Template will do that for you.

The specific say User Controller class will extend MultiActionController class. The UserDAOImpl instance is injected using setter injection.

In the jsp page we use Spring Form tags to display the form fields and jstl tags to display the list of users. In the add method we call the saveUser() method and redirect the control to the "list.htm" url. This will invoke the list() method. In the list method you add two things to the modelMap, the user list to display the list of users and an instance of the user object to bind the form fields in the userForm.jsp page.

In the jsp page we use Spring Form tags to display the form fields and jstl tags to display the list of users.