What is the difference between Spring, Struts, Hibernate, JavaServer Faces, Tapestry?

Spring is an IoC container (at least the core of Spring) and is used to wire things using dependency injection. Spring provides additional services like transaction management and seamless integration of various other technologies. Struts is an action-based presentation framework (but don’t use it for a new development). Struts 2 is an action-based presentation framework, … Read more

Library? Static? Dynamic? Or Framework? Project inside another project

First, some general definitions (specific to iOS): Static library – a unit of code linked at compile time, which does not change. However, iOS static libraries are not allowed to contain images/assets (only code). You can get around this challenge by using a media bundle though. A better, more formal definition can be found on … Read more

What is middleware exactly?

Lets say your company makes 4 different products, your client has another 3 different products from another 3 different companies. Someday the client thought, why don’t we integrate all our systems into one huge system. Ten minutes later their IT department said that will take 2 years. You (the wise developer) said, why don’t we … Read more

Finding the max/min value in an array of primitives using Java

Using Commons Lang (to convert) + Collections (to min/max) import java.util.Arrays; import java.util.Collections; import org.apache.commons.lang.ArrayUtils; public class MinMaxValue { public static void main(String[] args) { char[] a = {‘3’, ‘5’, ‘1’, ‘4’, ‘2’}; List b = Arrays.asList(ArrayUtils.toObject(a)); System.out.println(Collections.min(b)); System.out.println(Collections.max(b)); } } Note that Arrays.asList() wraps the underlying array, so it should not be too memory … Read more

Recommendations of Python REST (web services) framework? [closed]

Something to be careful about when designing a RESTful API is the conflation of GET and POST, as if they were the same thing. It’s easy to make this mistake with Django’s function-based views and CherryPy’s default dispatcher, although both frameworks now provide a way around this problem (class-based views and MethodDispatcher, respectively). HTTP-verbs are … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)