Wiki

Clone wiki

specter / Home

What's Specter Framework?

Specter it's a web framework that basically started as a university project (Universitat Oberta de Catalunya) where i was basically assigned the task of designing a web framework. So, first of all, i started analysing three of the most common frameworks nowadays: Struts 2, Spring MVC and Java Server Faces and i've gathered information of what things were really good design decisions, from my point of view, of course. Then, in addition to that, i deeply thought of what things i'd like to improve of them and what features were missing to me, making use of the acquired experience along the years of working with several frameworks of this kind, to finally decide the extraction of the best of both worlds and use them as a starting point from where i'll start the building of something that i really don't know where will it end. Keep in mind that it was designed in a month or so and i'm aware that there're a lot of changes that could be made (Please, have mercy!!!)

What's the organization of the project ?

Well, basically we've got 2 main components and a sample module:

  • specter-framework: It's the main library were all things happen :D
  • specter-framework-taglibs: There you'll find a few tags conceived to assist the developer, not to turn development into a tedious task
  • specter-sample-webapp: Sample web application with almost all features used. Enjoy!!

What are those features that makes it worth to try?

Basically my main premise was the zero-configuration aspect, meaning no configuration files, i'm not fond of them at all. So, the framework works all with annotations, no xml files or properties, just meta-information within the code. Please, take a look at the following start-up flow graph:

contest_loading

At startup time, the frameworks starts looking for components that were defined in the classpath. The type of components that can be defined are:

  • controllers: Request handlers if you prefere to call it that way. There you'll be able to define how you want to handle every incoming request that matches a certain url pattern (sort of Restfull syntax)
  • views: Right now, the only views supported are in Jsp format, but i'd love to add more types.
  • converters: They'll allow you to define convertion rules to any data type
  • validators: Same as converters, but in this case, you'll define any validation rule you like applied to any attribute you want.

After registering all components, a typical dispatching flow would be like is represented in the following graph:

dispatching_flow

Updated