Now there are so many Java Web frameworks, so many people don't know what to choose: JSF, Spring MVC, Stripes, Struts 2, tapestry, and wicket, they all have their own advantages, facing various problems, eight Immortals crossing, recount.
Here's a little talk about their pros and cons.
JSF benefits: Java EE standards, which means that there is a large market de
Additional explanation of several Java Collection frameworks
The fastutil library is better than the Trove Library: the Trove library has not been updated for three years and is a non-active open-source project. fastutil has been updating. Fastutil has more features, supports ultra-large collections (larger than 2 ^ 32, that is, 4 GB of sets), and more documents.
Fastutil is an extension of an open-source
statements. )。 However, it is important to note that the session object is non-thread-safe. At the same time, Hibernate's session differs from the HttpSession in JSP applications. When the term "session" is used, it is actually referring to the session in Hibernate, and later the HttpSession object is called the user session.2. Sessionfactory interface: Responsible for initializing hibernate. It acts as a proxy for the data storage source and is responsible for creating session objects. The fac
Common java testing frameworks1. Common Unit testing frameworks junit4 and TestNG
You can use the annotation @ Before @ After @ BeforeClass @ AfterClass to initialize and end methods and classes respectively.TestNG example:
public class TestngAnnotation { // test case 1 @Test public void testCase1() { System.out.println("in test case 1"); } // test case 2 @Test public void testCase2() { Sys
), overrides the ToArray () method, and provides a method of the specified type (for example, Todoublearray () for a double collection).3) The Fastutil collection typically provides an explicit rewrite of the toString () implementation, which makes it easy to output each data element, unlike the Java Standard arrays.tostring ().4) Fastutil packages are organized according to the original type and the implementation of different data structures, and ar
need to do some special processing. Set because it is a hash to achieve, so there is no guarantee to add into the set order, this time you can consider using the Linkedhashset class to handle, Linkedhashset class when the Add method is added, When printing can guarantee that the order of printing and the order of the original added is the same, HashSet is not guaranteed. There is also a class is TreeSet, tree set, this in some of the above interface and abstract class to do bedding, there are s
Currently, the declared restful Java frameworks include the following:Restlet (http://www.restlet.org /)Cetia4 (https://cetia4.dev.java.net /)Apache axis2 (http: // http://ws.apache.org/axis2)Sqlrest (http://sqlrest.sourceforge.net /)Rest-art (http://rest-art.sourceforge.net /)
The following provides a comprehensive analysis of these frameworks.
Restlet, latest v
Java multithreading ~~~ Synchronous and asynchronous Fork/Join frameworks
In the Fork/Join framework, there are two ways to submit a task: synchronous and asynchronous. The previously used invokeAll () method is synchronous, that is, any
After the task is submitted, this method will not be returned until all tasks have been processed. Another way is to use the fork method, which is asynchronous. Also
After
Namely: Spring, Struts, HibernateSpring: Powerful component bonding, the ability to combine all of your Java functional modules with a configuration file (and make it less than spring) becomes a complete applicationStruts: Not to mention, the famous powerful MVC architectureHibernate: Powerful ORM Tool, then it is convenient to convert database records into Java entity instances,
enough BooleanCancompute = (End-start) THRESHOLD; if(cancompute) { for(inti = start; I ) {sum+=i; } } Else {//if the task is greater than the threshold, it is split into two sub-task calculations intMiddle = (start + end)/2; Counttask Lefttask=Newcounttask (start, middle); Counttask Righttask=NewCounttask (middle + 1, end);//To perform sub-taskslefttask.fork (); Righttask.fork ();//wait for the subtasks to finish and get their results intleftresult=Lefttask.j
Collection of Java Collection frameworks and javacollectionThis figure is a class diagram of the relationship between Collection-related interfaces and classes in java. Among them, the class is only part of the set framework, a more common part. It was really hard to draw a class chart for the first time, but the harvest was not small. The following describes the
We have made many introductions to the Java EE Framework. This article will give a systematic summary of the four frameworks commonly used in Java EE.
Struts
Struts is an MVC framework based on the Sun Java EE platform, mainly implemented using Servlet and JSP technologies.
The Struts framework can be divided into t
Summary: Hibernate's role is to allow entity classes to map with databases, to persist data, to replace JDBC, so that we do not write as many SQL statement code.1. First on the official website www.hibernate.org download Hibernate package, about how to download the online also has a detailed tutorial. After the download, the required inside the jar package is all necessary, can be placed in a library, and then add MySQL (or other database) of the driver package, is all the class library we need.
manipulated, for example:while (It.hasnext ()) {Note that you cannot use List.add ("demo")!!!!!!It.add ("demo");}3. Common Objects|--Vector: The internal array data structure, is synchronous, 100% extended array, and delete queries are very slow.|--ArrayList: The internal is the array data structure, is not synchronized, replaced the vector,50% extended array, the query several degrees faster.|--linkedlist: Internal is a linked list data structure, is not synchronized, adding and deleting eleme
: When growth is needed, vectors grow by default to the original, while ArrayList is half the original.HashMap and Hashtable are mainly from three aspects. I. Historical reasons: Hashtable is based on the old dictionary class, HashMap is an implementation of the map interface introduced by Java 1.2 two. Synchronization: Hashtable is thread-safe, that is, it is synchronous, and HashMap is unsafe for the line program. , not synchronous three. Value: Onl
For some sensitive systems such as payments, transactions need to be reinforced, it is necessary to take into account possible attack situations to prevent, so there is such a simple security framework. In the code of the predecessor (see: http://blog.csdn.net/zhongweijian/article/details/8680737) I greatly refactor to better understand Java Web security implementation measures.Source code: Http://git.oschina.net/sp42/ajaxjs/tree/master/ajaxjs-securit
: When growth is needed, vectors grow by default to the original, while ArrayList is half the original.HashMap and Hashtable are mainly from three aspects. I. Historical reasons: Hashtable is based on the old dictionary class, HashMap is an implementation of the map interface introduced by Java 1.2 two. Synchronization: Hashtable is thread-safe, that is, it is synchronous, and HashMap is unsafe for the line program. , not synchronous three. Value: Onl
search is high; but adding or removing elements involves moving a large number of elements, which is inefficient.2) ArrayList provides three different construction methods, the parameterless construction method defaults to generating an array of type object of length 10, and when the number of elements added in the collection is greater than 10, the array is automatically expanded, i.e. a new array is generated and the elements of the original array are placed in the new array.3) Ensurecapacity
forStruts2OfActionDon't worry about thread-safety issues.6.InStruts1Used inFormbeanEncapsulates the request parameters in theStruts2Direct use inActionProperties to encapsulate pleaseParameters are evaluated.7.struts1Multiple business methods in aActionMedium time (that is, inheritanceDispatchaction), or both,Either are not verified;Struts2, you can specify that only one method is validated when aActionInherited theActionsupportAnd in this class, you write only theValidateXxx ()method, then onl
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.