One: The development trend of the Web
1:C/S (client/server) structure to B/s (browser/server) structure development, the future of the computer only need operating system and browser.
All services are stored on the server side, only need to log in after the user to synchronize data from the service, for example: see the movie does not need to download PPS, PPTV, etc.
Client software, just open the Web page, watch on the page; Write articles can be directly on the page (blog), do not need to download word software
, in the client software editing, e-mail directly on the page, do not need to download Foxmail, Outlook and other client software, the current trend
has been presented, but there are still a lot of constraints. Such as
A: Bandwidth constraints, resulting in no speed.
B: The functionality of the browser is not that powerful yet.
2: The advent of mobile devices has led to the development of decades of traditional software refactoring, people doing some learning or working activities are through the mobile device
, many programmers will need to port the previous PC-capable programs to mobile devices, which makes Android engineers brilliant.
3: The advent of the cloud and the popularity of B/s, resulting in the subsequent server-side programming will be very fire, the code will appear refactoring.
Second: Common Eclipse Breakpoint debugging
1:f5:step into Enter method F6:step over skip F7:step return jump
The symbol behind the 2:F7 jumps to the first line of the method step to resume:
3: Green triangle release Breakpoint or skip to next breakpoint
4: Select variable Right---watch: View the value of the variable
5: The endpoint of debug should be cleaned up in time before the view switch
Three: Eclipse common quick action
ALT + Before and after, tracking code
alt+/: Content Assistant
ctrl+shift+/: Notes
Ctrl+shift+\: Remove Comments
Ctrl+shift+g: See who calls the method
Ctrl+shift+o: Guide Pack
Ctrl+l: Navigates to a row in a file
Ctrl+shift+r: Finding Files
Ctrl+h: Find what's contained in a file
Ctrl+shift+f: Formatting code
Custom shortcut key: window--preferences--Enter keys to customize the binding shortcut.
Four: JUnit framework, Unit testing
1: Test method above annotated @test, remember to introduce JUNIT Framework and guide package
2: @before @after before and after the test method execution, you can load and close some resources
1 privateString Driverclassname; 2 PrivateString URL; 3 PrivateString username; 4 private String password; 5 private Connection Conn; 6 7 @Before 8 public void before () {9 DRIVERCL Assname = "Com.mysql.jdbc.Driver" ; url = "Jdbc:mysql://localhost:3306/test" ; username = "root" ; Password = "root" ; }14 @Test16/**17 * Test Get database connection */19 public void testgetconnection () throws SQLException {DataSource ds = new DataSource (driverclassname, URL, username, password), conn = ds. Getconnection (); SYSTEM.OUT.PRINTLN ("conn:" + conn); }25- @After27 public void after () {Conn! = null ] {$ try {$ conn.close (); System.out.println ("Close succeeded! ""); catch (SQLException e) {e.printstacktrace }35 }36} /span>
3: @beforeClass @afterClass executes before and after class loading, and is also used to load and close resources
The 4:assert API has some methods to assert whether the resulting values are equal to the expected value.
If the test succeeds, a green progress bar appears, and a brown progress bar appears for failure!
Javaweb Learning Summary One (Eclipse common shortcut keys, debug debugging, and JUnit test framework)