File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes How to build a custom Web framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "How to build a custom Web framework" Watch "How to build a custom Web framework" New topic

How to build a custom Web framework

Roger Marin

Joined: May 08, 2006
Posts: 16
Hello ranchers!!

I have some experience working with spring MVC but i am currently studying design patterns and various web application frameworks, to better understand these technologies i've decided to build my very own web framework from scrath...yes i know it's already been done, but i really want to learn and i thought what better way to do this than by actually building something usefull, at least that's the way i usually learn new technologies...

basically what i'm looking for, is to build initially a basic web MVC framework
that i could, over time, expand and add new features like ajax enabled components, reporting features, database centric features, and so on, somewhat easily. For that i need to know exactly what are the basic features of an MVC framework first. i would love to take advantage of annotations, generics and any other new java features (understand new as jdk >= 1.5) and of course OOP to the fullest!, i've already tried looking at some open source frameworks(spring, dinamica) but i've found myself overwhelmed by the amount of code and the level of maturity of these frameworks, i really need something that i can build myself and understand perfectly and these projects are huge and quite frankly i don't understand them at code level, so if any of you guys could point me in the right direction or give me any ideas whatsoever i would really appreciate it!

also K&B here's an idea for a book: Head First Java Frameworks!! that would be KILLER!!!

thanks everyone!!

Roger Marin
Caracas. Venezuela
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
For that i need to know exactly what are the basic features of an MVC framework first.

I think you have it inside out: First you should define what the framework should do. If you just copy what other frameworks do, then you might as well use one of those. Since "framework" is such a broad concept, no two frameworks have the same feature set. Think about what you are missing in the existing ones, and how one might go about implementing that.

A example of a framework that has been built with Java 5 in mind (and thus makes heavy use of Java 5 features) is Stripes.
[ March 06, 2007: Message edited by: Ulf Dittmer ]
Aaron Porter

Joined: Feb 26, 2007
Posts: 13
I recommend looking at Stripes also. Tim put a whole lot of thought into the design of the framework and it really shows.

I was thinking about building my own framework about a year and a half ago when I stumbled upon Stripes. It does nearly everything I wanted and what it didn't do I easily extended it to do. The codebase isn't so large that you can't understand what's going on.

If you do decide to go on and build your own framework after looking at Stripes you should have a pretty good understanding of what needs to be done.
Roger Marin

Joined: May 08, 2006
Posts: 16
Thank you guys for your suggestions, i'll definitely check out stripes!!!
I agree. Here's the link:
subject: How to build a custom Web framework
It's not a secret anymore!