JAVA basic Framework (MAVEN,JETTY,JODA-TIME,JUNIT) __java

Source: Internet
Author: User
Tags java web

How to build an application that every developer has to face.


1. Build tools maven

http://www.ibm.com/developerworks/cn/java/j-maven/

Although Ant is a de facto standard tool for building Java programs, this tool is in many ways incompetent for project management tasks. Instead, the things that Ant provides, Maven (advanced project management tools from the Apache Jakarta project) are available, and more. Java developer Charles Chan introduces the features of MAVEN and guides you step-by-step through the complete MAVEN project settings.


2.HTTP Server, Web container jetty

http://www.ibm.com/developerworks/cn/web/wa-lo-jetty/

Jetty is a Java-enabled, Open-source, standards-based, and rich-functionality Http server and Web container that can be used for free in business practices. Jetty This project was founded in 1995, and now has a lot of successful products based on Jetty, such as Apache Geromino, JBoss, IBM Tivoli, Cisco sesm and so on. Jetty can be used as a traditional WEB server or as a dynamic content server, and Jetty can be easily embedded in Java applications.

3. Time Control Joda-time

Http://www.ibm.com/developerworks/cn/java/j-jodatime.html

Now suppose I want to output a date that is 45 days after the date of the last day of the current week of the next one months Y2K. Frankly speaking, I don't even want to use calendar to deal with this problem. Using JDK is too painful, even for a simple date calculation, such as the one above. It was at such a time years ago that I first learned the power of joda-time. Using Joda, the code for the calculation is shown in Listing 3: listing 3. Switch to Joda

datetime datetime = new DateTime (Watts, 1, 1, 0, 0, 0, 0);
System.out.println (Datetime.plusdays) plusmonths (1). DayOfWeek ()
  . Withmaximumvalue (). toString ("E mm/dd/ YYYY HH:mm:ss. SSS ");

The output of Listing 3 is:

Sun 03/19/2000 00:00:00.000

If you are looking for an easy-to-use way to replace JDK date processing, then you really should consider Joda. If this is not the case, then continue to painfully use Calendar to complete all date calculations. When you do this, you can use a few scissors to build the lawn and use an old toothbrush to clean your car.


4. Unit Test JUnit

http://www.ibm.com/developerworks/java/tutorials/j-junit4/


5. The way the frame is built

Http://www.infoq.com/cn/news/2013/12/humble-architects


rule 4: Bottom-up consistency is better than top-down consistency

I have a way to achieve more consistency in the system: Create a reference application and use an easy to follow architecture. If this is done well, developers will always remember not to deviate from the architecture. Unless they don't want to, it's okay to do so. Cultivate a culture of mutual assistance. Developers who can see each other's code have better consistency than those who see only their own code. Pair programming, code review and technology sharing lectures all contribute to this culture.

6. The way to build DDD

Http://www.infoq.com/cn/articles/ddd-dddlib-development-process-and-marketing-experience

The concept of domain-driven design (DDD) originates from the book published by 2004 famous modeling expert Eric Evans: "Domain-driven design–tackling complexity in the Heart of Software" (Chinese translation: domain-driven design-the core complexity of software solutions), Chi Jianqiang in an article published in 2011, "Domain-driven design and practice", which describes DDD:

The domain-driven design is in fact an extension and extension of the Ooad, DDD based on object-oriented analysis and design technology, the technical framework of the layered planning, at the same time for each class strategy and classification.


7. Common Open Source Framework

AppFuse Java Web Development Open source framework

Http://appfuse.org/display/APF/AppFuse+QuickStart+-+Chinese

Opentaps Open Source Enterprise-class ERP system

http://www.opentaps.org/

Bootstrap concise, intuitive, strong front-end development framework, so that web development faster and simpler.

Http://v2.bootcss.com/customize.html

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.