Il seguente esercizio operativo serve per prendere confidenza con:
- Libreria Java Servlets & JSP
- Libreria Log4J
Si richiede di creare una pagina jsp che consenta di modificare dinamicamente alcuni livelli di logging:
- Si richiedono 5 livelli di log (qui ne sono mostrati solo 3 per semplicità)
- Si richiede di poterli configurare modificando un solo punto (es 5 var nascoste nel form)
- Si richiede di poter configurare la password (idem come sopra)
- Se la password è errata il sistema registra su un log l’errore e non fa nulla, ripresentando la maschera.
Example of a solution about car not starting.
If you car is not starting, check the batteries as first. It is the most common problem of issues
(this is an example document for the PanamaKB Plugin)
I have read http://www.manageability.org/blog/stuff/chandler-failure and I think it is very danger way of exposing concepts.
In the article pointed out, the quite dead Chandler project is compared to the multi-billion Eclipse project. And then a too easy analysis is done against dynamic languages, where Java is the absolute winner.
I will try to fix some of the things said there, and to add also my two cents here :)
First of all, I use Java a lot, but I am also a fan of dynamic languages. Every tool has its place in the world, and I will avoid some holy war here.
Anyway, it is important to understand major differences between very distant projects.
First of all, Eclipse is a very huge project, developed by IBM and based from the beginning with a very strong hype on plugin modularization.
The effort pushed inside Eclipse is very huge and come also from the San Francisco Project. Other IDEs (like JBuilder and Together) stops fighting Eclipse years ago, and eventually failed even to sell their stuff.
So there are no similar example to Eclipse in Python/Ruby/Perl world. Even in PHP is hard to find a so huge and well designed program. And the languge here is less important: a company big as IBM can also code in PL/I all its stuff, without so much pain :)
Second, PHP is very successful language, even if a bit too insecure, at the present time.
PHP Language has poor support for modules and so on, but project like Drupal, Joomla and other are full of plugins, quite easy to write.
RubyOnRails is falling down because nobody is understanding why PHP should be abandoned for Rails.
Java architectural model is very well written and Sun worked very hard to it. Java Hot Spot VM is derivered from the Self dynamic language, and has inside technology difficult to develop in an open source project.
Surely Dynamic languages are strong when there is the one-man-band paradigm: sharing works in Smalltalk was a bit complex in early days.
Put Perl, python and ruby have a strong modularization concepts, and so this issue is often solved.
I have tried Zope and I think it is weak because:
- Zope is user is non-existent. Zope user is a super-skilled web master which wants a web CMS without writing so much code.
- Zope product upgrade is a nightmare
- A stuck Zope Product can destroy your work. So hosting Zope is a problem
- A lot of Zope basic objects (like cache accelerators and so on) are poorly minded: they works only on RAM, and are not thinked well. Drupal 5 has more strong theory for this issue, and Drupal is poor PHP code.
- Zope use a proprietary database, when a simple SQL database with a relational mapper can do the same thing…think twice before reinventing the wheel!
- Every major Zope releases breaks a lot of the API. This is the most stupid thing you can do as open source developer.
Chandler failed because they tried a very difficult business: calendar software is a very difficult area to address. All operating system (including possibly C/64 :-) has now a huge set of Personal Information Manager software (PIM), and LDAP solves sharing issue for big companies
Even Ximian Evolution is near death.
And your bigger competitor is Microsoft Exchange and… yes… old Unix.
Dynamic lanuages has many lacks, and difficult refactoring is a problem but… remember frefactoring tools was INVENTED under SMALLTALK!
IT is a place where you must be careful… isn't it?
This is the sad true: parsing is boring. And writing parser is even worst.
If you can choose a scripting language for parsing you can think to do it in perl.
For this way, take a big breath and go in the black sea of perl's funny regexp. They are funny only if you have that special love for the regular expressions.
But if you are more confortable with python, pyparser is a better solution.
Pyparser is a library written in Python, for building parser described with a BNF (Backus-Naur Form).
O'Reilly has just published a "Short Cuts" e-book written by Paul McGuire; in less then 70 pages you get a very good insight of pyparser.
Even if you are new to python, the book is very easy to read.
And if you do not know nothing about parser and Backus & Naur, you will find an easy path to understand it. Parsing is a tricky topic because of the grammar theory behind it, but for all-day work, you can follow the McGuire introduction.
After some simple example, you'll dive into a small web page parser.
It is very amazing how you can do extraction from web pages without a complex Sax parser, and using only a very compact grammar.
After this intro examples, the manual take us to a more complex task: a lisp-like expression language parser called S-Expression.
This example is important because complex data structure are oftern recursive as S-Expression are.
The last chapter, "Search Engine in 100 Lines of Code", is a well-written example, and show us how to build a small search-engine-grammar.
So this e-book is a "must" if you need to do even simple parsing and you… do not want to become crazy with too regular expressions :)