|
Dear
Software Developers,
This CPTTM Software
Developer newsletter is to bring
useful news to
you, software developers in Macau, for references without obligations,
so that you can do your jobs easier and better! Hope you like it. if
you'd like to unsubscribe or recommend your friends to
subscribe, just email me at kent@cpttm.org.mo.
Old
issues are available here.
Topics
in this issue:
Statistics on agile development
A
company has conducted a survey on agile development on 722 respondents.
Over 85% of the people say that agile practices have increased their
time-to-market, increased productivity and reduced software defects and
over 60% say that they have reduced costs. In addition, over 80% of
those using agile practices consider their development projects
successful or very successful while less than 30% of
those non-agile consider their projects this way. The full
report is here. To become agile, you may consider joining our Agile software planning & requirement analysis course.
Easy database access with JPAWith
JPA you can easily load Java objects from a database or save them.
For example, you just annotate your Java class like: @Entity public class Book { @Id private Long id; private String isbn; private String title; private Date publicationDate; }
Then you can save a book with a single line: Book b = ...; EntityManager em = ...; em.persist(b);
To load all books whose publication dates are earlier than Jan 1, 2007, you can:
EntityManager em = ...; Query q = em.createQuery("select b from Book as b where b.publicationDate < :d"); q.setParameter("d", new GregorianCalendar(2007, 0, 1)); List books = q.getResultList();
In addition, JPA has some powerful features not found in plain SQL: - Association: If a Book object refers to an Author object, saving/loading a Book will save/load the Author automatically.
- Inheritance:
If a Book has subclasses such as EBook and PrintedBook, they can also
be saved/loaded using the code above. That is, loading Books will
correctly load EBooks and PrintedBooks too.
To learn how to setup JPA and use these advanced features, join our Reducing
your database access effort with JPA & Hibernate course. It has course fee reimbursement. Reloading changed Java classes automaticallyWhat
if you could change your Java code in a web application and the changed
class is immediately picked up by Tomcat without reloading the
whole application? Now you can do that with a (commercial) tool called JavaRebel. Functional languages getting serious?
In the previous issue I mentioned an interesting language called Scala which combines OOP and functional programming
and is primarily running on the Java platform. On the .NET side,
Microsoft has official support for a similar language called F#. Microsoft is also working on a Visual Studio plugin for F#. Similarly, for Scala, you can get the latest Eclipse Scala plugin (beta) today which supports content assist and syntax highlighting. I've tried it and it is quite usable. Free tool from Microsoft to detect XSS bugs
I've seen so many web sites in Macau suffering from XSS security problems which allows hackers to deface them easily. To make sure your site is not one of them, you should really check out this free tool from Microsoft if your site is written in ASP.NET. It's a Visual Studio plug-in that analyzes your code to find XSS problems.
Upcoming courses
for software developers
In addition, there are some courses your
kids may enjoy:
Feedbacks
Any
questions, ideas or experiences to share? Contact me at
28781313 or kent@cpttm.org.mo. We also
have two other newsletters: CIO newsletter
and Network
administrator newsletter,
your friends may like to
subscribe.
Until
next time,
Kent
Tong
|