JP 的个人资料Wireless Earth, wireless...照片日志列表 工具 帮助

JP

列表

Wireless Earth, wireless ville

10月30日

Soft Delete and Unique Check

There are two kinds of design of deletion in an enterprise application:

  • Soft Delete
  • Hard Delete

Soft Delete does not delete the record from database, but just set a flag to mark it as deleted. On the contrary, Hard Delete deletes the record from database, so there is no way to get it back after deletion.

Either design has some pros and cons. Relatively, Soft Delete is quite complicated for implementation and maintenance. But why people still choose this design? One good reason is for auditing. Auditing is usually a mandatory requirement for an enterprise application.

But Soft Delete caused many problems, data integrity is significant one, especially unique constraint.

For example, table color:

create table color ( ID integer, color VARCHAR2(10), isdelete CHAR(1) default 'N');

isdelete is used for Soft Delete.

Because when isdelete is ‘Y’, there could be more than one records has the same ID. So we cannot use unique constraint on ID column.

A possible solution is use Oracle Function-Based unique index:

create unique index color_unique_index on color (NVL2(NULLIF(isdelete, 'Y'), ID, null));

Here I use to functions:

NULLIF

The syntax for the NULLIF function is:

    NULLIF( expr1, expr2 )

expr1 and expr2 must be either numeric values or values that are of the same data type.

NVL2

The syntax for the NVL2 function is:

    NVL2( string1, value_if_NOT_null, value_if_null )

string1 is the string to test for a null value.

value_if_NOT_null is the value returned if string1 is not null.

value_if_null is the value returned if string1 is null.

With this unique index, I can insert only one active record for each ID, but can insert any number of “deleted” records with same ID.

9月1日

Windows Live Messenger 8100030d Resolved

Log on to Windows Live Messenger 2009 always failed with error 8100030d recently.

Test connection with IE proxy, it shows connection to service successfully.

Google result:

“MSN 8100030d error are usually caused when the operating system's registry contains errors or when certain system files are missing or broken; Msn 8100030d error problems are a sign of a very unhealthy system.  Msn 8100030d error are caused in one way or another by misconfigured system files”

So I tried to scan and fix Registry to fix it.

Somebody recommended RegCure, Perfect Optimizer and other tools:

http://www.fixerror365.com/tidpp-msn_8100030d_error-zz0005

But these tools are sharewares, I want to use open source or freeware. I tried Auslogics Registry Cleaner, because it is free and I am using its Auslogics Disk Defrag, which is pretty good.

Download Auslogics Registry Cleaner, install, run, basic scan, fix, 8100030d still exist.

Run Auslogics Registry Cleaner advanced scan, select all items, scan, fix, it works!

6月8日

SyncML Representation Protocol 1.2

SyncML -- SyncHdr -- VerDTD
       |          |- VerProto
       |          |- SessionID
       |          |- MsgID
       |          |- Target -- LocURI
       |          |         |- LocName
       |          |         +- Filter -- Meta
       |          |                   |- Field -- Item -- Target -- Target
       |          |                   |        |       |- Source -- LocURI -- LocURI
       |          |                   |        |       |         +- LocName -- LocName
       |          |                   |        |       |- SourceParent -- LocURI -- LocURI
       |          |                   |        |       |- TargetParent -- LocURI -- LocURI
       |          |                   |        |       |- Meta -- Meta
       |          |                   |        |       |- Data
       |          |                   |        |       +- MoreData -- MoreData
       |          |                   |- Record -- Item -- Item
       |          |                   +- FilterType
       |          |- Source -- Source
       |          |- RespURI
       |          |- NoResp -- NoResp
       |          |- Cred -- Meta -- Meta
       |          |       +- Data -- Data
       |          +- Meta -- Meta
       +- SyncBody -- Alert -- CmdID
                   |        |- NoResp -- NoResp
                   |        |- Cred -- Cred
                   |        |- Data -- Data
                   |        |- Correlator
                   |        +- Item -- Item
                   |- Atomic -- CmdID -- CmdID
                   |         |- NoResp -- NoResp
                   |         |- Meta -- Meta
                   |         |- Add -- CmdID -- CmdID
                   |         |      |- NoResp -- NoResp
                   |         |      |- Cred -- Cred
                   |         |      |- Meta -- Meta
                   |         |      +- Item -- Item
                   |         |- Replace -- CmdID -- CmdID
                   |         |          |- NoResp -- NoResp
                   |         |          |- Cred -- Cred
                   |         |          |- Meta -- Meta
                   |         |          +- Item -- Item
                   |         |- Delete -- CmdID -- CmdID
                   |         |         |- NoResp -- NoResp
                   |         |         |- Archive -- Archive
                   |         |         |- SftDel -- SftDel
                   |         |         |- Cred -- Cred
                   |         |         |- Meta -- Meta
                   |         |         +- Item -- Item
                   |         |- Copy -- CmdID -- CmdID
                   |         |       |- NoResp -- NoResp
                   |         |       |- Cred -- Cred
                   |         |       |- Meta -- Meta
                   |         |       +- Item -- Item
                   |         |- Atomic -- Atomic
                   |         |- Map -- CmdID -- CmdID
                   |         |      |- Target -- Target
                   |         |      |- Source -- Source
                   |         |      |- Cred -- Cred
                   |         |      |- Meta -- Meta
                   |         |      +- MapItem -- Target -- Target
                   |         |                 +- Source -- Source
                   |         |- Move -- CmdID -- CmdID
                   |         |       |- NoResp -- NoResp
                   |         |       |- Cred -- Cred
                   |         |       |- Meta -- Meta
                   |         |       +- Item -- Item
                   |         |- Sequence -- CmdID -- CmdID
                   |         |           |- NoResp -- NoResp
                   |         |           |- Meta -- Meta
                   |         |           |- Add -- Add
                   |         |           |- Replace -- Replace
                   |         |           |- Delete -- Delete
                   |         |           |- Copy -- Copy
                   |         |           |- Atomic -- Atomic
                   |         |           |- Map -- Map
                   |         |           |- Move -- Move
                   |         |           |- Sync -- CmdID -- CmdID
                   |         |           |       |- NoResp -- NoResp
                   |         |           |       |- Cred -- Cred
                   |         |           |       |- Target -- Target
                   |         |           |       |- Source -- Source
                   |         |           |       |- Meta -- Meta
                   |         |           |       |- NumberOfChanges
                   |         |           |       |- Add -- Add
                   |         |           |       |- Atomic -- Atomic
                   |         |           |       |- Copy -- Copy
                   |         |           |       |- Delete -- Delete
                   |         |           |       |- Move -- Move
                   |         |           |       |- Replace -- Replace
                   |         |           |       +- Sequence -- Sequence
                   |         |           |- Get -- CmdID -- CmdID
                   |         |           |      |- NoResp -- NoResp
                   |         |           |      |- Lang
                   |         |           |      |- Cred -- Cred
                   |         |           |      |- Meta -- Meta
                   |         |           |      +- Item -- Item
                   |         |           |- Alert -- Alert
                   |         |           +- Exec -- CmdID -- CmdID
                   |         |                   |- NoResp -- NoResp
                   |         |                   |- Cred -- Cred
                   |         |                   |- Meta -- Meta
                   |         |                   |- Correlator -- Correlator
                   |         |                   +- Item -- Item
                   |         |- Sync -- Sync
                   |         |- Get -- Get
                   |         |- Exec -- Exec
                   |         +- Alert -- Alert
                   |- Copy -- Copy
                   |- Exec -- Exec
                   |- Get -- Get
                   |- Map -- Map
                   |- Put -- CmdID -- CmdID
                   |      |- NoResp -- NoResp
                   |      |- Lang -- Lang
                   |      |- Cred -- Cred
                   |      |- Meta -- Meta
                   |      +- Item -- Item
                   |- Results -- CmdID -- CmdID
                   |          |- MsgRef
                   |          |- CmdRef
                   |          |- Meta -- Meta
                   |          |- TargetRef
                   |          |- SourceRef
                   |          +- Item -- Item
                   |- Search -- CmdID -- CmdID
                   |         |- NoResp -- NoResp
                   |         |- NoResults -- NoResults
                   |         |- Cred -- Cred
                   |         |- Target -- Target
                   |         |- Source -- Source
                   |         |- Lang -- Lang
                   |         |- Meta -- Meta
                   |         +- Data -- Data
                   |- Sequence -- Sequence
                   |- Status -- CmdID -- CmdID
                   |         |- MsgRef -- MsgRef
                   |         |- CmdRef -- CmdRef
                   |         |- Cmd
                   |         |- TargetRef -- TargetRef
                   |         |- SourceRef -- SourceRef
                   |         |- Cred -- Cred
                   |         |- Chal -- Meta -- Meta
                   |         |- Data -- Data
                   |         +- Item -- Item
                   |- Sync -- Sync
                   |- Add -- Add
                   |- Move -- Move
                   |- Replace -- Replace
                   |- Delete -- Delete
                   +- Final -- Final

6月2日

Tips of Subversion

  1. How to find SVN version

Repository version:

Look to the repository on the web and on the bottom of the page it will say something like: 
   "Powered by Subversion version 1.5.1 (r32289)."
Client version:
svn –version

svn, version 1.5.5 (r34862)
   compiled Dec 23 2008, 12:42:22

 
5月19日

OOD Principles

Class Design Principles

(SRP) The Single Responsibility Principle
A class should have only one reason to change.
(OCP) The Open-Closed Principle
Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.
(LSP) The Liskov Substitution Principle
Subtypes must be substitutable for their base types.
(DIP) The Dependency Inversion Principle
Abstractions should not depend upon details. Details should depend upon abstractions.
(ISP) The Interface Segregation Principle
Clients should not be forced to depend upon methods that they do not use. Interfaces belong to clients, not to hierarchies.

Principles of Package Cohesion

(REP) The Reuse/Release Equivalency Principle
The granule of reuse is the granule of release.
(CCP) The Common Closure Principle
The classes in a package should be closed together against the same kinds of changes. A change that affects a closed package affects all the classes in that package and no other packages.
(CRP) The Common Reuse Principle
The classes in a package are reused together. If you reuse one of the classes in the package, you reuse them all.

Principles of Package Coupling

(ADP) The Acyclic Dependencies Principle
Allow no cycles in the package dependency graph.
(SDP) The Stable Dependencies Principle
Depend in the direction of stability.
(SAP) The Stable Abstraction Principle
A package should be as abstract as it is stable.
12月30日

Year in Review: The Java tools roundup

A year of progress for build automation, testing tools, and IDEs

By John Ferguson Smart, JavaWorld.com, 12/27/08

Tools for the software development lifecycle, or SDLC, moved to the forefront in 2008. For this Year in Review feature, tools expert John Ferguson Smart homes in on what's new and improved about his favorite build-automation frameworks, testing tools, and IDEs. If you haven't been keeping up on the tools front, here's your chance to modernize your Java toolbox, just in time for the new year.

In any age or industry, keeping your tools well honed is key to success. If you're not using the latest and greatest in flint spear tips, you can't hunt mammoths as well as the tribe over the next hill. Software development is no exception: staying on top of development tools and techniques requires constant vigilance. This article takes a look at some of the highlights of 2008 in the world of Java software development lifecycle (SDLC) tools, namely build-automation tools, testing tools, and IDEs. I'll present a survey of how tools in these areas have progressed, in many cases by optimizing and adding new features favorable to developers. Along the way, I'll also discuss the big picture behind some of these improvements -- such as mainstream adoption of CI, the rise of scripting on the JVM, and increasing demand for tools that support programming for multicore systems. Let the tour begin!

Build automation

I'll start with one of the cornerstones of any modern software development process: build automation. In the broad sense, build automation includes continuous integration (CI) tools of course, but also build-scripting tools, code-quality metrics tools, and version-control, or SCM repositories.

The first stage of build automation is an automated build script. Traditional tools such as Apache Maven and Apache Ant, as well as newcomers Gant and Gradle, facilitate build scripting. In 2008, I saw many large organizations move toward Maven, attracted by the possibility of standardizing their development practices across multiple teams and imposing a more coherent, transparent architecture on their internal software components. This trend certainly looks set to continue in 2009.

Maven: New and upcoming features

In 2008, Maven 2 version 2.0.9, the final version of the Maven 2.0 series, was released. Maven 2.0.9 fixes bugs and adds a few new features. One of its nicer improvements is better stability: as of Maven 2.0.9, the default versions of the lifecycle plugins (which implement all the core Maven features) are bound to the version of Maven. This means that lifecycle plugin versions can't be updated behind the scenes as new releases appear, a habit that could occasionally result in unpredictable build behavior. Another nice feature is the ability to override the dependencies used in plugins; for example, you can update the version of Checkstyle used by the Checkstyle plugin.

However, the most active area of Maven development has been dedicated to the upcoming new major release, Maven 2.1, due to come out in early 2009. This new version will contain many performance improvements and optimizations, including a more refined build algorithm for multi-module projects, and the possibility to download unrelated dependencies in parallel, rather than sequentially as we do today.

For the moment, however, this development work has been visible to the broader public only in the form of the highly dynamic m2eclipse plugin. Although it is still a little unstable in some areas, this plugin positions Eclipse as the platform of choice for Maven development, providing a full and feature-rich graphical editor for the Maven pom.xml file. Features such as the Dependency Graph (see Figure 1) and Dependency Hierarchy, for example, make it much easier to visualize your project dependencies and to understand and resolve dependency conflicts that can occur when different libraries require different versions of the same third-party library.

 The Dependency Graph and the Maven Index View

Figure 1. The Dependency Graph and the Maven Index View, two of the many useful features in the m2eclipse plugin (Click to enlarge.)

Dependency-search is another feature of m2eclipse that, once you use it, you won't be able to do without. It makes adding new dependencies to your project a non-event. Gone are the days of hunting the Internet for the correct dependency references. Now you simply search the Maven repository by name and pick the version you want to include it in your pom.xml file.

A Maven repository manager is another tool that no serious Maven user could easily go without. A Maven repository acts both as a cache for dependencies downloaded from the public repositories on the Internet, and as a repository for libraries published and shared within the organization. 2008 saw the emergence of a new leader in this field, in the form of Nexus. Nexus is easy to use and configure, making administration of a Maven repository a real pleasure.

Gant and Gradle steal Ant's thunder

The traditional Java build-scripting tool, Ant, evolved little over the past year. Gant, in contrast, has been developing at a rapid pace. Gant is a build-scripting tool that lets you use Groovy rather than XML to build Ant tasks. Gant is notably the underlying build tool of the promising Grails Web framework, which also progressed by leaps and bounds this year (more on Grails later). For anyone who can't live without the flexibility of Ant, but doesn't like the wordy XML syntax, Gant is worth a look.

In a similar vein, Gradle is another promising Groovy-based build tool that made its debut in 2008. Like Gant, Gradle tries to provide Ant's flexibility with a Groovy syntax, but it also lets you leverage many Maven-like features such as transitive dependency management and convention over configuration.

CI integral to SDLC

The Java development world in 2008 is clearly moving beyond seeing continuous integration tool and frameworks as glorified schedulers, now viewing them as key to the whole SDLC infrastructure. Build metrics, for instance, are a great way to keep tabs on your development process as a whole. A good CI tool lets you keep track not only of the number of tests, and test failures, in the latest build, but also of how your tests are doing over time. This sort of data can also be used to fine-tune the development process.

Hudson a developer favorite

In the past year Hudson has evolved from a nascent product to one of the more popular open source CI servers on the market. Although Hudson's dynamism sometimes comes at the cost of minor glitches, its intuitive user interface and slick reporting features make it a great little CI tool. Hudson also leads the market in Maven integration, being the only tool, currently, that can correctly decide which projects need to be rebuilt based on the Maven dependency graphs. This can save you a lot of work when you have complex, multi-module Maven projects. Hudson also comes with a rich library of plugins, allowing you to add features such as integration with JIRA or Trac, or automated deployment onto a Tomcat server.

Take the running time, or duration, of a typical build as an example. A slow build slows down the development cycle and discourages developers from building and testing locally and often (as the mantra goes). Knowing that a unit test failed in the last build is useful, and it lets you correct the issue quickly while the changes you made are fresh in your mind. But if a build failure persists over a dozen successive builds, this could indicate a deeper technical or organizational problem that the team leader might want to investigate. Similarly, a sudden increase in test duration can indicate a potential performance degradation, data that has practical uses in a development project.

Figure 2 shows a graph of build duration over time. The build duration here was considered to be too long; in build 8, build-optimization work brought the average build duration from 15 minutes down to around 2.

Build metrics

Figure 2. Build metrics, such as build duration over time, can be used to spot inefficiencies in the build process

This sort of optimization would clearly be much harder without good tool support. CI practices add a new dimension into code-metrics tools by enabling developers to display and analyze code metrics over time. This is one of the more significant innovations in CI over the last year or two. Bamboo, a commercial CI tool from Atlassian, has introduced many powerful features in this area, including graphs showing both build duration over time and individual test duration over time.

CI and code-quality tool integration

Some CI tools provide excellent integration for code-quality tools such as Checkstyle, PMD, FindBugs, Cobertura, and Emma. These tools provide useful snapshots of different aspects of your project's general health, in terms of coding standards, dubious practices and dodgy code, and code coverage. Hudson and Bamboo show not only the number of issues raised for a given build, but also the number of issues over time. The open source code-quality tools themselves are relatively stable. This year saw the emergence of a few new Checkstyle features and an ever-growing FindBugs rules database. On the commercial front, Clover has been releasing many innovative new features, including per-test coverage, which lets you see not only how often your application code was executed during tests, but also which tests executed the code.

In other areas, 2008 has seen CI emerge from the exclusive domain of the build master or technical team lead to take on a much more democratic role. For example, in Hudson, one plugin lets a developer "claim" a failed build, to indicate the probable cause and let colleagues know that he or she is working on it. In Bamboo, you can add comments to builds, or start an IM discussion among developers from a build-failure notification. Hudson even has a "CI Game" plugin that lets team members compete for points awarded for improvements to the overall quality of the application code base.

Subversion 1.5 released

In the version-control repository space, the big news of 2008 was the long-awaited release of Subversion 1.5. It introduces several powerful new features including merge tracking and improved support for replicated repositories. The new merge features make merging changes in different branches an order of magnitude easier. In previous versions, to merge changes related to a bug fix in a release branch back into the main trunk, for example, you needed to work out by hand exactly which revisions were involved in these changes. Any error would result in corrupted source code. In Subversion 1.5, you simply specify the branch from which you want to merge your changes, and Subversion figures out the rest, integrating only the changes made since the last time you merged.

The impacts of this new feature should not be underestimated; they open the door to new possibilities of build automation based around Subversion. For example, some teams work with a stable Subversion trunk using only production code, and branches dedicated to work on new features. When a feature is finished, it is merged into the trunk for release into the next production release. The problem with this approach is that it makes CI difficult and tends to push back the integration stage, effectively neutralizing the benefits of CI. With Subversion 1.5, you could set up an integration branch that would automatically merge changes made in each feature branch. Any merge conflict or integration error could therefore be raised at an early stage, rather than much later on in the process.

Testing tools

Much has happened in 2008 for Java-based testing tools. In particular, the year saw a growing interest in behavior-driven development (BDD) testing frameworks, and Web testing tools have been making significant strides.

Testing tools tackle executable requirements

BDD is a new take on the test-driven development (TDD) techniques popular in Agile circles. By moving the focus of testing activity away from testing as such, and toward expressing your requirements in executable form, you can obtain a much more precise design and development cycle.

Version 2.0 of JBehave was released in September 2008. JBehave is a Java BDD framework in which you write BDD scenarios using special JUnit test cases along with special annotations such as @Given, @When, and @Then. You also write a corresponding text scenario, which lets you write your behavior stories before you implement the solutions. Listing 2 shows a simple test case.

Listing 1. Simple JBehave test case
public class AccountDepositSteps extends Steps {

Account account = null;
BigDecimal initialDeposit = new BigDecimal("100.00");

    @Given("I have created a new account")
    public void createAccount() {
        account = new Account();
    }

    @When("I deposit $100 into the account")
    public void deposit() {
        account.makeDeposit(initialDeposit);
    }

    @Then("My account should have a balance of $100")
    public void checkBalance() {
        ensureThat(account.getBalance(), equalTo(initialDeposit));
    }
}

A new Groovy-based BDD framework, easyb, brings the considerable power of Groovy and the structured approach of BDD to the field of Java testing. Easyb uses a Groovy domain-specific language (DSL) that follows the BDD scenario pattern. Groovy scripting can make tests an order of magnitude more expressive, especially if you are familiar with Groovy idioms such as file processing, collections, and closures. The test case in Listing 1 would be written in easyb as shown in Listing 2.

Listing 2. Easyb test case
scenario "Make initial deposit onto a new account", {
    given "I have created a new account",{
       account = new Account()
    }
    when "I deposit $100 into the account", {
       initialAmount = 100
       account.makeDeposit(initialAmount)
    }
    then "the balance should be equal to the amount deposited", {
        account.balance.shouldBe initialAmount
    }
    and "My account should have a balance of $100", {
        account.balance.shouldBeEqualTo initialAmount
    }
}
Web testing tools evolve

There's more to testing than just unit testing. Web testing is another area where tools have evolved in 2008. Two tools are particularly worth keeping on your radar in this area: Selenium and Canoo WebTest.

Selenium is an original testing tool that runs your Web tests in a browser. In 2008, the beta version of Selenium 1.0 finally came out, bringing better stability and a few more features. You can use Selenium for both functional and regression testing, by recording Selenium test scripts against a running application, and for TDD by writing Selenium test cases in Java or even Groovy. 2008 also saw the appearance of Selenium Grid, a promising tool that lets you distribute your tests across multiple servers and run tests in parallel or on platform-specific browsers.

Canoo WebTest has also seen a lot of activity in 2008. This powerful Web testing framework is well-suited to a TDD or BDD approach. Using Canoo WebTest, you can write test cases for your Web applications in XML or Groovy. Canoo WebTest runs against a Web application and produces clear, detailed HTML test reports. Grails uses Canoo WebTest under the hood for its automatically generated functional tests. (Canoo Web Test is not quite as versatile as Selenium, though: because it simulates JavaScript rather than actually executing it in a browser, its JavaScript support is not as good as Selenium's.)

IDEs

On the IDE front, 2008 saw the releases of Eclipse 3.4 Ganymede and of NetBeans 6.5, both with a passel of new features.

Eclipse 3.4 comes with an enhanced Java development environment with many improvements in the contextual assistance features, better quick fixes, and a host of improved usability features. One nice new refactoring feature is the Extract Class option, which lets you take a group of variables and methods from a class and create a new class encapsulating these fields and methods. Compilation is also a lot faster in Eclipse 3.4, which can take advantage of multicore processors by spreading the work across several cores. And Eclipse 3.4 supports Subversion out of the box, thanks to the now fully integrated Subversive plugin. This provides a nicer out-of-the-box experience, though some more experienced users might still want to install the alternative Subclipse plugin instead.

Groovy, Grails, and IDEs

Groovy and Grails made large inroads into the Java community this year. Groovy is a dynamic scripting language described by some as "Java, as it would have been implemented in the 21st century." Grails is a powerful, Ruby-like Web framework based on Groovy. With Grails, you can create a working CRUD application literally within minutes, thanks to a combination of tools and convention-over-configuration. In addition, for Java developers, Grails has the reassuring appeal of being built on top of familiar open source Java libraries such as Spring, Hibernate, and Lucene, and being compatible with standard Java Web application servers.

One of the barriers to the use of Groovy and Grails, and of any of the newer dynamic languages such as Scala and Clojure, has been a lack of IDE support. Dynamic language support in IDEs is hard to implement because of those languages' typeless nature. For example, it's difficult, though certainly not impossible, to provide good code-completion features. IntelliJ is currently the best IDE on the market for programming in Groovy and Grails. The support in Eclipse is much less sophisticated, making the user experience for Groovy developers on this platform quite frustrating. NetBeans 6.5 has good support for dynamic languages (although not as good as IntelliJ's). Nevertheless, 2009 promises to bring improved tool support for dynamic languages across the board.

But my favorite Eclipse 3.4 feature has to be Mylyn 3.0. In a nutshell, Mylyn is a quite brilliant tool that integrates issue-management tools such as JIRA and Bugzilla into Eclipse. It helps you work more efficiently by displaying only the information relevant to the task you are currently dealing with. Mylyn has been integrated into Eclipse since the Europa edition, which came with Mylyn 2.0. Mylyn 3.0 provides many new and improved features, such as the ability to create tasks offline (great for plane trips), and to create tasks from any of the Eclipse marker views (Problems, Tasks, Bookmarks, and so on), or even from a failed JUnit test!

NetBeans coming of age

With its latest release, NetBeans is becoming a pleasant development environment indeed. As always, it offers a smoother user experience than Eclipse, though at the cost of a shorter list of available plugins. Good news for Maven users: with NetBeans 6.5, the IDE has become more Maven-friendly. Although not as rich as the m2eclipse plugin for Eclipse, the NetBeans Maven plugin is of good quality and treats Maven projects as first-class citizens.

NetBeans 6.5 provides excellent support for a range of dynamic languages, including JavaScript, Groovy and Grails, PHP, and even Ruby/Rails. You can create projects using all of these languages, and NetBeans provides an efficient development environment for each of them. The code completion for Groovy, for example, is pretty smart and does a decent job of guessing object types based on how they are used. And you can create, and work with, Grails applications pretty much out of the box.

NetBeans 6.5 is also the IDE of choice for working with JavaFX, Sun's new up-and-coming rich Internet application (RIA) platform, via an optional plugin that makes creating and debugging JavaFX applications a real pleasure.

Finally, NetBeans 6.5 provides improved native support for libraries such as Spring, Hibernate, and JavaServer Faces (JSF), with features such as a "Go to Spring Bean" dialog, and support for executing Hibernate Query Language (HQL) queries from within the IDE.

In conclusion

2008 was an eventful year on the tools front. Development environments are becoming more feature-rich and easier to use, and they're adding capabilities to meet the increasing use of dynamic languages such as Groovy and Ruby. The growing interest in these dynamic languages was indeed another clearly visible trend in 2008. And if there was an overall trend in the build-automation tools of 2008, you could say that it is one of democratization. Groovy is making headway into the testing domain, making it easier for developers to write much more expressive and powerful tests. Tools like Hudson and Bamboo are taking CI out of the hands of dedicated specialists, and involving the development team members more and more. Maven is becoming easier to use, now boasting a rich user interface that makes it that much easier to understand a new build script or to work on an existing one. And the new features of Subversion 1.5 make exiting new automation scenarios feasible. So what is your team going to automate next?

(original)

11月30日

滕王阁序

豫章故郡,洪都新府,星分翼轸,地接衡庐。襟三江而带五湖,控蛮荆而引瓯越。物华天宝,龙光射牛斗之墟,人杰地灵,徐孺下陈蕃之榻。雄州物列,俊彩星驰。台隍枕夷夏之交,宾主尽东南之美。都督阎公之雅望,棨戟遥临;宇文新州之懿范,幨帷暂驻。十旬休暇,胜友如云,千里逢迎,高朋满座。腾蛟起凤,孟学士之词宗,紫电青霜,王将军之武库。家君做宰,路出名区,童子何知,躬逢胜饯。

时为九月,序属三秋。潦水尽而寒潭清,烟光凝而暮山紫。俨驂騑于上路,访风景于崇阿。临帝子之长洲,得仙人之旧馆。层峦耸翠,上出重霄,飞阁流丹,下临无地。鹤汀凫渚,穷岛屿之萦回;桂殿兰宫,列冈峦之体势。

披绣闼,俯雕甍,山原旷其盈视,川泽盱其骇瞩。闾阎扑地,钟鸣鼎食之家;舸舰迷津,青雀黄龙之舳。虹銷雨霁,彩彻云衢,落霞与孤鹜齐飞,秋水共长天一色。渔舟唱晚,响穷彭蠡之滨;雁阵惊寒,声断衡阳之浦。

遥吟俯畅,逸兴遄飞。爽籁发而清风生,纤歌凝而白云遏。睢园绿竹,气凌彭泽之樽;邺水朱华,光照临川之笔。四美俱,二难并。

穷睇眄于中天,极娱游于暇日。天高地迥,觉宇宙之无穷;兴尽悲来,识盈虚之有数。望长安于日下,指吴会于云间。地势极而南溟深,天柱高而北辰远。关山难越,谁悲失路之人。萍水相逢,尽是他乡之客。怀帝阍而不见,奉宣室以何年?

呜呼,时运不济,命运多舛。冯唐易老,李广难封。屈贾谊于长沙,非无圣主;窜梁鸿于海曲,岂乏明时?所赖君子安贫,达人知命。老当益壮,宁知白首之心。穷且益坚,不坠青云之志。酌贪泉而觉爽,处涸辙以犹欢。北海虽赊,扶摇可接。东隅已逝,桑榆未晚。孟尝高洁,空怀报国之志。阮籍猖狂,岂效穷途之哭?

勃,三尺微命,一介书生。无路请缨,等终军之弱冠。有怀投笔,慕宗悫之长风。舍簪笏于百龄,奉晨昏于万里。非谢家之宝树,接孟氏之芳邻。他日趋庭,叨陪鲤对,今晨捧袂,喜托龙门。杨意不逢,抚凌云而自惜;钟期既遇,奏流水以何惭?

呜呼,胜地不常,盛筵难再。兰亭已矣,梓泽丘墟。临别赠言,幸承恩于伟饯;登高作赋,是所望于群公。敢竭鄙诚,恭疏短引。一言均赋,四韵俱成:

滕王高阁临江渚,佩玉鸣莺罢歌舞。画栋朝飞南浦云,珠帘暮卷西山雨。闲云潭影日悠悠,物换星移几度秋。阁中帝子今何在?栏外长江空自流。

 
第 1 张,共 2 张
更多相册 (1)
尚未添加列表。