|
2012年1月28日
#
http://mijiale.me/26640.htmlUbuntu下思维导图软件Xmind一直用思维导图软件,对整理思维很有帮助,很多的地方可以用到,比较有帮助 平时用来日程管理/读书笔记/时间管理等 安装拉ubuntu 9.04后,找Ubuntu系统下的思维导图软件。 开始用了freemind,是Java开发的开源软件,在windows xp下用过,对中文处理不是太好,有人发布更新,对中文可以比较好的处理。测试Ubuntu下的Freemind,界面不如xp下的好看,并且中文处理不好,部分中文乱码 Google的,Xmind,也是Java开发的开源软件,window/linux/Mac,安装测试,界面非常漂亮,用起来很舒服 并且可以导入Freemind/mindmanager的文件,方便转移的xmind下面工作,很方便 Xmind网址是这个http://www.xmind.net/ 英文网站,不过是国内团队开发的,市场针对欧美 并且有专业收费版,具体服务还不是很清楚。不过,免费版功能足够强,够用了。有时间了解一下专业版
http://www.bberger.net/SpringJPA.pdf
总得来说,myeclipse比 sts idea在理念上要高一个层次
http://stackoverflow.com/questions/2313660/eclipse-version this is not work but useful for common eclipse version you can check the main install folder open ./readme/readme_eclipse.html in the txt file will some version descripation
HandlerSocketDescriptionHandlerSocket is a MySQL plugin that implements a NoSQL protocol for MySQL. This allows applications to communicate more directly with MySQL storage engines, without the overhead associated with using SQL. This includes operations such as parsing and optimizing queries, as well as table handling operations (opening, locking, unlocking, closing). As a result, using HandlerSocket can provide much better performance for certain applications that using normal SQL application protocols. Complete documentation on the HandlerSocket plugin, including installation and configuration options, is located here. The plugin is disabled by default. To enable it in Percona Server with XtraDB, see below. Please be aware that this is currently an experimental feature, and use it as such. Enabling the PluginOnce HandlerSocket has been downloaded and installed on your system, there are two steps required to enable it. First, add the following lines to the [mysqld] section of your my.cnf file: loose_handlersocket_port = 9998
# the port number to bind to for read requests
loose_handlersocket_port_wr = 9999
# the port number to bind to for write requests
loose_handlersocket_threads = 16
# the number of worker threads for read requests
loose_handlersocket_threads_wr = 1
# the number of worker threads for write requests
open_files_limit = 65535
# to allow handlersocket to accept many concurrent
# connections, make open_files_limit as large as
# possible.
Second, log in to mysql as root, and execute the following query: mysql> install plugin handlersocket soname 'handlersocket.so'; Testing the Plugin installationIf handlersocket.so was successfully installed, it will begin accepting connections on ports 9998 and 9999. Executing a SHOW PROCESSLIST command should show HandlerSocket worker threads: mysql> SHOW PROCESSLIST;
+----+-------------+-----------------+---------------+---------+------+-------------------------------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------------+-----------------+---------------+---------+------+-------------------------------------------+------------------+
| 1 | system user | connecting host | NULL | Connect | NULL | handlersocket: mode=rd, 0 conns, 0 active | NULL |
| 2 | system user | connecting host | NULL | Connect | NULL | handlersocket: mode=rd, 0 conns, 0 active | NULL |
...
| 16 | system user | connecting host | NULL | Connect | NULL | handlersocket: mode=rd, 0 conns, 0 active | NULL |
| 17 | system user | connecting host | handlersocket | Connect | NULL | handlersocket: mode=wr, 0 conns, 0 active | NULL | To ensure HandlerSocket is working as expected, you can follow these steps: Create a new table: mysql> CREATE TABLE t (
id int(11) NOT NULL,
col varchar(20) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB; Insert a row with HandlerSocket (fields are separated by tabs): $ telnet 127.0.0.1 9999
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
P 1 test t PRIMARY id col
0 1
1 + 2 1 test value
0 1 And check in SQL that the row has been written: mysql> SELECT * FROM t;
+----+------------+
| id | col |
+----+------------+
| 1 | test value |
+----+------------+ Configuration optionsHandlerSocket has many configuration options that are detailed here.
许久没关注Java了,连MyEclipse这等高档货的发布笔者也是懒得追踪了,今天看到一位朋友留言提及了MyEclipse,就直接去官方看了一眼,发现MyEclipse居然已经升级到MyEclipse 9.1了,而且是MyEclipse 9.1正式版下载地址绝非beta和里程碑版本。因为 某些原因,国内似乎无法直接访问,所以如果想亲自去看看的,可以想写办法。老规矩我们先来说说MyEclipse 9.1带来了啥新鲜玩意,之后上MyEclipse 9.1下载地址。  myeclipse 9.1下载 MyEclipse 9.1主要改进包括: - 首先MyEclipse 9.1已经基于Eclipse 3.6的,这点在笔者在MyEclipse 8系列版本的时候就猜到了。所以MyEclipse 8系列基本一致固守Eclipse 3.5不动摇。接下来就是一如既往的对各种新的规范,各种开源矿建新版本的支持了。在笔者看来MyEclipse之所以一致如此受欢迎的原因也是如此。 Eclipse受众本来就不少,再加上如此多的而且快的开源框架的支持,绝对是一旦拥有别无所求的好东东。不过随着此体积的不断增肥,笔者的老爷机器已经 完全扛不住了,所以也不再本机测试了。废话少说,我们继续往下看
- MyEclipse 9.1增强了对Java EE 6高级特性的支持,包括对 Servlet 3.0, JSF 2.0, JPA 2.0, EJB 3.1, JAX-RS 1.1的高级特性的支持。
- MyEclipse 9.1增强了对ICEfaces 2的支持(看来ICEfaces 2发展的不错,已经受到MyEclipse的看重了), 通过使用MyEclipse 9.1提供的可视化设计器,可以轻松的添加ICEfaces 2组件和标记,同时改编辑器和能根据源码内容提供动态自动完成以及校验功能,可谓一个不错的ICEfaces 2开发利器啊。
- MyEclipse 9.1终于克服了win64位地狱了,MyEclipse 9.1提供了完美的64bit window安装版本,让那些64bit window操作系统的朋友可以不用发愁了。没错,64bit的诞生意味着更大的内存,快的浮点运算,没准运行Eclipse也会更快吧,我猜。不过遗憾 的是,官方仍然表示由于技术原因,在64bit的window操作系统上,Visual Designers, the REST Explorer and JavaScript debugging这三个工具仍然缺席了,也就是说如果您对这三个插件势在必得,那么还是32bit的吧。不过官方并没有说linux下的版本不行,所以 笔者也不好妄加揣测了。不过32bit的window版本的MyEclipse 9.1仍然是最完美的版本。
- MyEclipse 9.1另一大亮点就是增加了对Cocoa的支持,如果用户在基于Cocoa的操作系统上安装MyEclipse 9.1就会出现选项咨询是安装Carbon 32-bit, Cocoa 32-bit 还是 Cocoa 64-bit.去年笔者听到传闻乔布斯抱怨Java发布的针对Mac系统的版本总要滞后于其它操作系统的版本,如今MyEclipse居然直接推出了基于 Cocoa框架的版本,是否意味着Java在苹果上的表现有些耐人寻味呢?不过与window 64bit版本一样Visual Designers, the REST Explorer and JavaScript debugging这三个工具在Cocoa版本中也缺席了,想要获取改功能,只能使用Carbon 32-bit版本。
- 最后要提及的就是MyEclipse 9.1对Struts 2的增强了。Struts 2这个让笔者耳熟甚至感到亲切的名字在笔者脱离技术层面之前曾经还想努力学习之的,毕竟webwork2笔者曾经玩过一年终归还是有些印象的,不过现在看 看,都是浮云了。MyEclipse 9.1中提高了连接路由功能,同时改进了undo/redo的功能,同时对Strtus 2的配置文件增加了语法校验的支持。
MyEclipse 9.1下载地址: - http://downloads.myeclipseide.com/downloads/products/eworkbench/helios/installers/myeclipse-9.1-offline-installer-windows.exe
- http://downloads.myeclipseide.com/downloads/products/eworkbench/helios/installers/myeclipse-9.1-offline-installer-linux.run
- http://downloads.myeclipseide.com/downloads/products/eworkbench/helios/installers/myeclipse-9.1-offline-installer-macosx.dmg
MyEclipse Blue Edition 9.1 - http://downloads.myeclipseide.com/downloads/products/eworkbench/helios/installers/myeclipse-blue-9.1-offline-installer-windows.exe
- http://downloads.myeclipseide.com/downloads/products/eworkbench/helios/installers/myeclipse-blue-9.1-offline-installer-linux.run
MyEclipse for Spring for STS 2.3.2 (Galileo) http://downloads.myeclipseide.com/downloads/products/eworkbench/galileo/me4s-eclipse MyEclipse for Spring for STS 2.5 (Helios) http://downloads.myeclipseide.com/downloads/products/eworkbench/helios/me4s-eclipse MyEclipse for Spring 9.1 - http://downloads.myeclipseide.com/downloads/products/eworkbench/helios/installers/MyEclipseForSpring-9.1-offline-installer-windows.exe
- http://downloads.myeclipseide.com/downloads/products/eworkbench/helios/installers/MyEclipseForSpring-9.1-offline-installer-linux.run
- http://downloads.myeclipseide.com/downloads/products/eworkbench/helios/installers/MyEclipseForSpring-9.1-offline-installer-macosx.dmg
基本列出了所有常用的MyEclipse 9.1下载地址了,笔者直接迅雷试验了一次,在国内是MyEclipse 9.1是可以下载的动的,不过也只试验了window版本,其它的版本。其它的也都是笔者通过同样的方法获取的下载地址,估计也都差不多。最近对C#有些 兴趣了,感觉可能要搞C#了,哈哈,Java对笔者来说,似乎已经是一个梦了。 转载请注明来源并保留原文链接
http://www.thelinuxgeeks.info/howto-install-zip-rar-and-7-zip-in-ubuntu/ sudo apt-get install p7zip-full
http://www.myeclipseide.com/documentation/quickstarts/ME4STutorialScaffoldingGWT/scaffoldinggwtarticle.html#N1031B  MyEclipse for Spring 10.0: GWT 2.1 and Spring ScaffoldingScaffolding a Google Web Toolkit (GWT) 2.1 and Spring CRUD application in minutesCopyright © 2011 Skyway Software
One of the goals of MyEclipse for Spring (ME4S) is to help developers write less code from scratch and use code generation more broadly, and ME4S offers the richest set of code generation options available anywhere. ME4S can generate software components for Spring MVC, Spring Web Flow, Spring Security, REST, JAX-WS, Adobe Flex, Google Web Toolkit (GWT), JPA, DAO and JSF 2.0/Primefaces. As an alternative to writing software components from scratch, ME4S helps developers generate software components that are specific to their project. In many cases the software components may be used as-is, or they may be used as a starting point for further development. Furthermore the developer can edit the ME4S templates to further customize how the software components are generated. Scaffolding refers to the superset of ME4S's broad code generation functions, from generating a specific set of requested software components to generating fully implemented ready-to-run applications. Besides the obvious benefits of reducing application development effort and sparing developers from some of the chores of development, scaffolding is also frequently used for rapidly developing functional prototypes, learning new technologies, and application modernization projects. The ability to quickly generate a full application is very beneficial to prototyping because you can iterate on a domain model and regenerate a functional prototype in minutes. The prototype can be used with business analysts as a tool for elaborating requirements and as the starting point for development. ME4S helps many developers learn new technologies by generating contextual reference projects, which are personalized projects that are based on their own data model. This is a considerably better approach than hunting for sample projects that are often incomplete, don't follow modern best practices, and are based on trivial data models. ME4S can also be used to jumpstart an application modernization effort by leveraging application artifacts from the current system for generating a significant portion of the application components for the new system. The objective of this tutorial is to walk you through the generation of software components for Google Web Toolkit (GWT), a software development kit for building rich internet applications that run inside a html/javascript browser. The goals of GWT are to simplify the development of rich AJAX applications by using Java to implement the applications, which ultimately is compiled into javascript applications. In addition to generating the GWT software components, this tutorial will also generate the software components for the service, domain, and data access layers. This will result in a fully implemented ready-to-run GWT application that can be immediately used for validating and testing the generated GWT components, and it will also serve a reference implementation for how the generated GWT components integrate with the other components of an application. The MyEclipse for Spring scaffolding capabilities support two GWT recipes. This tutorial will focus on the GWT 2.1 implementation. Application Architecture: Web Layer - GWT 2.1 Service Layer - Spring (@Service) Domain Layer - JPA (@Entity) Data Access Layer - Spring (@Repository)
MyEclipse for Spring uses the Create-Read-Update-Delete (CRUD) application pattern for generating applications that allows the end-user to manage application data. While CRUD isn't the only application pattern, it's a fairly typical application pattern. While not all web applications are satisfied solely by the CRUD application pattern, developers find that the resulting generated application artifacts lend themselves to being easily re-used, customized and extended. CRUD applications are tied to an application domain model that is used as the input into the scaffolding engine. The domain model can exist in many forms, and the MyEclipse for Spring scaffolding functionality supports the use of Java beans, JPA entities, or database tables as inputs. This tutorial is going to walk you through producing a ready-to-run GWT 2.1 and Spring 3.0 application that implements the CRUD application pattern for a domain model. Domain model: CUSTOMERS table from the MyEclipse Derby database. Target Container: MyEclipse Tomcat Target Database: MyEclipse Derby
MyEclipse for Spring will be used to generate the entire JSF 2.0, Primefaces and Spring 3.0 application within a matter of minutes that includes: A JPA entity corresponding to domain model (CUSTOMERS) A DAO for managing the JPA entity, Finder methods (JPA named queries) in the DAO based on domain model fields, A Service with fully implemented CRUD operations for managing domain model, GWT 2.1 UI components using UIBinder GWT Activities and Places classes to support GWT UI flow GWT RequestFactory classes for integrating with remote data services Service and data access adapters for GWT CSS for UI styling JUnits for every Service and Controller, SpringSource certified code and configuration files, Generated code that follows Spring Recipes,
The prerequisites needed to complete this tutorial are: 4. Install Google Eclipse PluginsIf you're going to do GWT development in MyEclipse (or Eclipse), then you will need the Google Eclipse Plugins (GEP). GEP includes the GWT SDK and some tools for GWT development. Among other things GEP will be used to compile the GWT application that is generated by MyEclipse for Spring. GEP is available in the Pulse catalog, and it can be easily added to your installation using the MyEclipse Configuration Center. Open the MyEclipse Configuration Center from the Help-->MyEclipse Configuration Center menu Switch to the Software tab. Search for "Google" to find the Google Plugin for Eclipse software in the Pulse catalog. Follow the standard process for adding software from the Pulse catalog, right-click on the entry and select Add to Profile.
Verify the the Google Plugin for Eclipse is shown as a pending software update, and click the Apply Change button.
When the installation is complete, you will be prompted to restart MyEclipse for Spring.
Create a MyEclipse Web Project (or Eclipse Dynamic Web Project) called CustomersGwtApp.
6. Configure web project for GWTBefore we start generating the GWT application, the project requires some basic GWT setup using some of the tools provided by the Google Eclipse Plugin. To setup the project for GWT, right-click on the CustomersGwtApp and select Google-->Web Toolkit Settings... The first thing to do is to specify that this project will use GWT. From the Google-->Web Toolkit group, check the Use Google Web Toolkit checkbox. The next step is to specify that the current project has a WAR directory. From the Google-->Web Application group, check the This project has a WAR directory checkbox. The WAR directory should be automatically configured. If not, specify the WAR directory. The Launch and deploy from this directory checkbox should also be checked.
7. Scaffold from Database TablesIt's now time to generate all the software components and configuration files required to implement the CRUD application. Right-click on the CustomersGwtApp project, and choose MyEclipse > Scaffold Spring CRUD application... The first step is to select the type of artifact you want to scaffold from. As mentioned in the introduction there are a variety of possible inputs into scaffolding. For this tutorial we're going to scaffold from a pre-existing database table that comes with the MyEclipse Derby database. Choose the Database Schema option on the Select Artifact Type(s) panel. Click the Next button. The next step is to select the DB connection for accessing the MyEclipse Derby database. This panel will show you all configured DB connections in the MyEclipse workspace, and you must select the MyEclipse Derby connection, which is a preconfigured DB connection in MyEclipse. Click the Next button. The next step is to specify which database table(s) to scaffold an application from. Start by selecting the desired schema, and the select the database table(s) that should be used for scaffolding. When the CLASSICCARS schema is selected, the tables list will be populated with a list of tables. The CUSTOMER table should be added to the scaffolding list. Click the Next button. The next panel will prompt you to select parent objects. This panel also lets you override the derived name of the Java Object that will be created from the database table. Since we're only scaffolding from a single database table, the Customer Java object must be the parent. For GWT scaffolding ALL tables must be selected as parent objects. This is because the GWT client assumes that the CRUD services have been generated for all tables. Making an object a parent causes the back-end services to be generated for that table. For this tutorial there's nothing that needs to be changed on this panel so just click the Next button.
The next step is to specify which layers of the application should be scaffolded and which package names should be used for each layer. All the layers are enabled by default. Enter org.customerapp as the base package. The package names for the different layers will be automatically derived from the base package. A sub-package (i.e. web, service, DAO, and domain) will be added to the end of the base package. The next step is to specify which web clients should be generated for the web layer. As you can see, there are a variety of different web clients available, including Spring MVC, Spring Web Flow, JavaServer Faces (JSF), Adobe Flex, GWT, and iPhone. This tutorial is focused on GWT, so click on the Generate checkbox for Google Web Toolkit. The next step is to select the GWT recipe that should be used. As explained in the introduction, MyEclipse for Spring supports two different GWT scaffolding recipes. For this tutorial we'll be generating using the GWT 2.1 recipe which encompasses the latest GWT technology and best practices from the Google GWT team. The next step is an optional step to specify the REST scaffolding options. Since REST scaffolding is beyond the scope of this tutorial, we'll just skip to the next step of the wizard. The next step is in an optional step to customize the UI. For this tutorial we'll go with the defaults.
The next step is to specify where the application (source code, configuration files, JSP, etc...) should be generated to in the current project and a few additional scaffolding options. For this panel the defaults are fine. Click the Next button. The final configuration step is to specify the libraries that should be added to the current project, how they should be added (classpath containers or copied into project), and the version of Spring to use. For this panel the defaults are fine. Click the Next button. The final panel will give you a summary of everything that will be generated for you. Click the Finish button to scaffold the application from the information you provided in the wizard.
That's it. Once the wizard is complete you have a generrated a GWT 2.1 and Spring application that implements the CRUD application pattern for the domain model (CUSTOMERS DB table). The GWT code that was generated by MyEclipse for Spring needs to be compiled into Javascript using the GWT SDK Right-click on the CustomersGwtApp project, and select Google-->GWT Compile The GWT Compile window should be preset with valid compile options. To initiate the compile, click the Compile button. The compile will take approximately one minute to complete. You can monitor the progress using the Eclipse Console view. When the compile is complete, you will see a "Compilation succeeded " message in the console.
The next step is to see the application in operation by deploying it to Tomcat. The running application can be used for validating the generated GWT components and observing the integration with the other components of the application To deploy the application, right-click on the CustomersGwtApp project and select Run As --> MyEclipse Server Application. MyEclipse Tomcat will start up. The first page will be a dashboard for accessing all scaffolded web clients. Since this tutorial only scaffolded a single database table for GWT, the only option under Google Web Toolkit is View GWT Scaffolding. Click on it to see the generated GWT application in operation. The GWT application can be used to (a) list all customers, (b) view customer details, (c) edit customer details, (d) delete customers and (e) add new customers. The following screen shots show some of the views.
The scaffolded application is compromised of many integrated software components, and the following diagrams provide an overview of which software components were generated and where they can be found in the project. Understanding what gets generated (and where) will help you find the individual or set of software components that you want use in your own developent projects. The GWT 2.1 scaffolding blueprint provides a snapshot of what gets generated during scaffolding. The GWT blueprint and the blueprints for the other ME4S code generations capabilities are covered in more detail in the MyEclipse for Spring reference guide. (see Additional Developer Resources).
Now that you have a running GWT application, you may want re-run the tutorial and scaffold different web clients, including Spring MVC, Spring Web Flow, Adobe Flex, JavaServer Faces 2.0, and iPhone. You may also want to try the Spring Annotator, JAX-WS Annotator and JPA annotator tutorials which are available in the Eclipse help system and online (see Additional Developer Resources). What was your experience with this tutorial? Share your experience with us by completing a very brief survey. 12. Additional Developer ResourcesThank you for you interest in MyEclipse for Spring. If you are interested in learning more, the following developer resources are available:
http://www.myeclipseide.com/documentation/quickstarts/ME4STutorialScaffoldingGWT/scaffoldinggwtarticle.html#N1031B  MyEclipse for Spring 10.0: GWT 2.1 and Spring ScaffoldingScaffolding a Google Web Toolkit (GWT) 2.1 and Spring CRUD application in minutesCopyright © 2011 Skyway Software
One of the goals of MyEclipse for Spring (ME4S) is to help developers write less code from scratch and use code generation more broadly, and ME4S offers the richest set of code generation options available anywhere. ME4S can generate software components for Spring MVC, Spring Web Flow, Spring Security, REST, JAX-WS, Adobe Flex, Google Web Toolkit (GWT), JPA, DAO and JSF 2.0/Primefaces. As an alternative to writing software components from scratch, ME4S helps developers generate software components that are specific to their project. In many cases the software components may be used as-is, or they may be used as a starting point for further development. Furthermore the developer can edit the ME4S templates to further customize how the software components are generated. Scaffolding refers to the superset of ME4S's broad code generation functions, from generating a specific set of requested software components to generating fully implemented ready-to-run applications. Besides the obvious benefits of reducing application development effort and sparing developers from some of the chores of development, scaffolding is also frequently used for rapidly developing functional prototypes, learning new technologies, and application modernization projects. The ability to quickly generate a full application is very beneficial to prototyping because you can iterate on a domain model and regenerate a functional prototype in minutes. The prototype can be used with business analysts as a tool for elaborating requirements and as the starting point for development. ME4S helps many developers learn new technologies by generating contextual reference projects, which are personalized projects that are based on their own data model. This is a considerably better approach than hunting for sample projects that are often incomplete, don't follow modern best practices, and are based on trivial data models. ME4S can also be used to jumpstart an application modernization effort by leveraging application artifacts from the current system for generating a significant portion of the application components for the new system. The objective of this tutorial is to walk you through the generation of software components for Google Web Toolkit (GWT), a software development kit for building rich internet applications that run inside a html/javascript browser. The goals of GWT are to simplify the development of rich AJAX applications by using Java to implement the applications, which ultimately is compiled into javascript applications. In addition to generating the GWT software components, this tutorial will also generate the software components for the service, domain, and data access layers. This will result in a fully implemented ready-to-run GWT application that can be immediately used for validating and testing the generated GWT components, and it will also serve a reference implementation for how the generated GWT components integrate with the other components of an application. The MyEclipse for Spring scaffolding capabilities support two GWT recipes. This tutorial will focus on the GWT 2.1 implementation. Application Architecture: Web Layer - GWT 2.1 Service Layer - Spring (@Service) Domain Layer - JPA (@Entity) Data Access Layer - Spring (@Repository)
MyEclipse for Spring uses the Create-Read-Update-Delete (CRUD) application pattern for generating applications that allows the end-user to manage application data. While CRUD isn't the only application pattern, it's a fairly typical application pattern. While not all web applications are satisfied solely by the CRUD application pattern, developers find that the resulting generated application artifacts lend themselves to being easily re-used, customized and extended. CRUD applications are tied to an application domain model that is used as the input into the scaffolding engine. The domain model can exist in many forms, and the MyEclipse for Spring scaffolding functionality supports the use of Java beans, JPA entities, or database tables as inputs. This tutorial is going to walk you through producing a ready-to-run GWT 2.1 and Spring 3.0 application that implements the CRUD application pattern for a domain model. Domain model: CUSTOMERS table from the MyEclipse Derby database. Target Container: MyEclipse Tomcat Target Database: MyEclipse Derby
MyEclipse for Spring will be used to generate the entire JSF 2.0, Primefaces and Spring 3.0 application within a matter of minutes that includes: A JPA entity corresponding to domain model (CUSTOMERS) A DAO for managing the JPA entity, Finder methods (JPA named queries) in the DAO based on domain model fields, A Service with fully implemented CRUD operations for managing domain model, GWT 2.1 UI components using UIBinder GWT Activities and Places classes to support GWT UI flow GWT RequestFactory classes for integrating with remote data services Service and data access adapters for GWT CSS for UI styling JUnits for every Service and Controller, SpringSource certified code and configuration files, Generated code that follows Spring Recipes,
The prerequisites needed to complete this tutorial are: 4. Install Google Eclipse PluginsIf you're going to do GWT development in MyEclipse (or Eclipse), then you will need the Google Eclipse Plugins (GEP). GEP includes the GWT SDK and some tools for GWT development. Among other things GEP will be used to compile the GWT application that is generated by MyEclipse for Spring. GEP is available in the Pulse catalog, and it can be easily added to your installation using the MyEclipse Configuration Center. Open the MyEclipse Configuration Center from the Help-->MyEclipse Configuration Center menu Switch to the Software tab. Search for "Google" to find the Google Plugin for Eclipse software in the Pulse catalog. Follow the standard process for adding software from the Pulse catalog, right-click on the entry and select Add to Profile.
Verify the the Google Plugin for Eclipse is shown as a pending software update, and click the Apply Change button.
When the installation is complete, you will be prompted to restart MyEclipse for Spring.
Create a MyEclipse Web Project (or Eclipse Dynamic Web Project) called CustomersGwtApp.
6. Configure web project for GWTBefore we start generating the GWT application, the project requires some basic GWT setup using some of the tools provided by the Google Eclipse Plugin. To setup the project for GWT, right-click on the CustomersGwtApp and select Google-->Web Toolkit Settings... The first thing to do is to specify that this project will use GWT. From the Google-->Web Toolkit group, check the Use Google Web Toolkit checkbox. The next step is to specify that the current project has a WAR directory. From the Google-->Web Application group, check the This project has a WAR directory checkbox. The WAR directory should be automatically configured. If not, specify the WAR directory. The Launch and deploy from this directory checkbox should also be checked.
7. Scaffold from Database TablesIt's now time to generate all the software components and configuration files required to implement the CRUD application. Right-click on the CustomersGwtApp project, and choose MyEclipse > Scaffold Spring CRUD application... The first step is to select the type of artifact you want to scaffold from. As mentioned in the introduction there are a variety of possible inputs into scaffolding. For this tutorial we're going to scaffold from a pre-existing database table that comes with the MyEclipse Derby database. Choose the Database Schema option on the Select Artifact Type(s) panel. Click the Next button. The next step is to select the DB connection for accessing the MyEclipse Derby database. This panel will show you all configured DB connections in the MyEclipse workspace, and you must select the MyEclipse Derby connection, which is a preconfigured DB connection in MyEclipse. Click the Next button. The next step is to specify which database table(s) to scaffold an application from. Start by selecting the desired schema, and the select the database table(s) that should be used for scaffolding. When the CLASSICCARS schema is selected, the tables list will be populated with a list of tables. The CUSTOMER table should be added to the scaffolding list. Click the Next button. The next panel will prompt you to select parent objects. This panel also lets you override the derived name of the Java Object that will be created from the database table. Since we're only scaffolding from a single database table, the Customer Java object must be the parent. For GWT scaffolding ALL tables must be selected as parent objects. This is because the GWT client assumes that the CRUD services have been generated for all tables. Making an object a parent causes the back-end services to be generated for that table. For this tutorial there's nothing that needs to be changed on this panel so just click the Next button.
The next step is to specify which layers of the application should be scaffolded and which package names should be used for each layer. All the layers are enabled by default. Enter org.customerapp as the base package. The package names for the different layers will be automatically derived from the base package. A sub-package (i.e. web, service, DAO, and domain) will be added to the end of the base package. The next step is to specify which web clients should be generated for the web layer. As you can see, there are a variety of different web clients available, including Spring MVC, Spring Web Flow, JavaServer Faces (JSF), Adobe Flex, GWT, and iPhone. This tutorial is focused on GWT, so click on the Generate checkbox for Google Web Toolkit. The next step is to select the GWT recipe that should be used. As explained in the introduction, MyEclipse for Spring supports two different GWT scaffolding recipes. For this tutorial we'll be generating using the GWT 2.1 recipe which encompasses the latest GWT technology and best practices from the Google GWT team. The next step is an optional step to specify the REST scaffolding options. Since REST scaffolding is beyond the scope of this tutorial, we'll just skip to the next step of the wizard. The next step is in an optional step to customize the UI. For this tutorial we'll go with the defaults.
The next step is to specify where the application (source code, configuration files, JSP, etc...) should be generated to in the current project and a few additional scaffolding options. For this panel the defaults are fine. Click the Next button. The final configuration step is to specify the libraries that should be added to the current project, how they should be added (classpath containers or copied into project), and the version of Spring to use. For this panel the defaults are fine. Click the Next button. The final panel will give you a summary of everything that will be generated for you. Click the Finish button to scaffold the application from the information you provided in the wizard.
That's it. Once the wizard is complete you have a generrated a GWT 2.1 and Spring application that implements the CRUD application pattern for the domain model (CUSTOMERS DB table). The GWT code that was generated by MyEclipse for Spring needs to be compiled into Javascript using the GWT SDK Right-click on the CustomersGwtApp project, and select Google-->GWT Compile The GWT Compile window should be preset with valid compile options. To initiate the compile, click the Compile button. The compile will take approximately one minute to complete. You can monitor the progress using the Eclipse Console view. When the compile is complete, you will see a "Compilation succeeded " message in the console.
The next step is to see the application in operation by deploying it to Tomcat. The running application can be used for validating the generated GWT components and observing the integration with the other components of the application To deploy the application, right-click on the CustomersGwtApp project and select Run As --> MyEclipse Server Application. MyEclipse Tomcat will start up. The first page will be a dashboard for accessing all scaffolded web clients. Since this tutorial only scaffolded a single database table for GWT, the only option under Google Web Toolkit is View GWT Scaffolding. Click on it to see the generated GWT application in operation. The GWT application can be used to (a) list all customers, (b) view customer details, (c) edit customer details, (d) delete customers and (e) add new customers. The following screen shots show some of the views.
The scaffolded application is compromised of many integrated software components, and the following diagrams provide an overview of which software components were generated and where they can be found in the project. Understanding what gets generated (and where) will help you find the individual or set of software components that you want use in your own developent projects. The GWT 2.1 scaffolding blueprint provides a snapshot of what gets generated during scaffolding. The GWT blueprint and the blueprints for the other ME4S code generations capabilities are covered in more detail in the MyEclipse for Spring reference guide. (see Additional Developer Resources).
Now that you have a running GWT application, you may want re-run the tutorial and scaffold different web clients, including Spring MVC, Spring Web Flow, Adobe Flex, JavaServer Faces 2.0, and iPhone. You may also want to try the Spring Annotator, JAX-WS Annotator and JPA annotator tutorials which are available in the Eclipse help system and online (see Additional Developer Resources). What was your experience with this tutorial? Share your experience with us by completing a very brief survey. 12. Additional Developer ResourcesThank you for you interest in MyEclipse for Spring. If you are interested in learning more, the following developer resources are available:
http://www.myeclipseide.com/documentation/quickstarts/ME4STutorialScaffoldingMVC/scaffoldingarticle.htmlMyEclipse for Spring 10.0: Spring 3.0 MVC ScaffoldingScaffolding a Spring 3.0 MVC CRUD application in minutesCopyright © 2011 Skyway Software
One of the goals of MyEclipse for Spring (ME4S) is to help developers write less code from scratch and use code generation more broadly, and ME4S offers the richest set of code generation options available anywhere. ME4S can generate software components for Spring MVC, Spring Web Flow, Spring Security, REST, JAX-WS, Adobe Flex, Google Web Toolkit (GWT), JPA, DAO and JSF 2.0/Primefaces. As an alternative to writing software components from scratch, ME4S helps developers generate software components that are specific to their project. In many cases the software components may be used as-is, or they may be used as a starting point for further development. Furthermore the developer can edit the ME4S templates to further customize how the software components are generated. Scaffolding refers to the superset of ME4S's broad code generation functions, from generating a specific set of requested software components to generating fully implemented ready-to-run applications. Besides the obvious benefits of reducing application development effort and sparing developers from some of the chores of development, scaffolding is also frequently used for rapidly developing functional prototypes, learning new technologies, and application modernization projects. The ability to quickly generate a full application is very beneficial to prototyping because you can iterate on a domain model and regenerate a functional prototype in minutes. The prototype can be used with business analysts as a tool for elaborating requirements and as the starting point for development. ME4S helps many developers learn new technologies by generating contextual reference projects, which are personalized projects that are based on their own data model. This is a considerably better approach than hunting for sample projects that are often incomplete, don't follow modern best practices, and are based on trivial data models. ME4S can also be used to jumpstart an application modernization effort by leveraging application artifacts from the current system for generating a significant portion of the application components for the new system. The objective of this tutorial is to walk you through the generation of software components for Spring MVC, which is a web framework from the creators of the Spring framework. In addition to generating the Spring MVC software components, this tutorial will also generate the software components for the service, domain, and data access layers. This will result in a fully implemented ready-to-run Spring MVC application that can be immediately used for validating and testing the generated Spring MVC components, and it will also serve a reference implementation for how the generated Spring MVC components integrate with the other components of an application. Application Architecture: Web Layer - Spring MVC (@Controller) Service Layer - Spring (@Service) Domain Layer - JPA (@Entity) Data Access Layer - Spring (@Repository)
MyEclipse for Spring uses the Create-Read-Update-Delete (CRUD) application pattern for generating applications that allows the end-user to manage application data. While CRUD isn't the only application pattern, it's a fairly typical application pattern. While not all web applications are satisfied solely by the CRUD application pattern, developers find that the resulting generated application artifacts lend themselves to being easily re-used, customized and extended. CRUD applications are tied to an application domain model that is used as the input into the scaffolding engine. The domain model can exist in many forms, and the MyEclipse for Spring scaffolding functionality supports the use of Java beans, JPA entities, or database tables as inputs. This tutorial is going to walk you through producing a ready-to-run Spring MVC application that implements the CRUD application pattern for a domain model. Domain model: CUSTOMERS table from the MyEclipse Derby database. Target Container: MyEclipse Tomcat Target Database: MyEclipse Derby
MyEclipse for Spring will be used to generate the entire Spring 3.0 application within a matter of minutes that includes: A JPA entity corresponding to domain model (CUSTOMERS) A DAO for managing the JPA entity, Finder methods (JPA named queries) in the DAO based on domain model fields, A Service with fully implemented CRUD operations for managing domain model, A Controller with fully implemented request handlers for supporting web application, All the necessary Spring annotations and configuration files for a Spring MVC app, CRUD JSP pages using Spring Form tag library and JSTL Layout managed user interface using Sitemesh, Client-side validation implemented Spring JS with DOJO, CSS for UI styling JUnits for every Service and Controller, SpringSource certified code and configuration files, Generated code that follows Spring Recipes,
The prerequisites needed to complete this tutorial are: Create a MyEclipse Web Project (or Eclipse Dynamic Web Project) called CustomersApp.
5. Scaffold from Database TablesIt's now time to generate all the software components and configuration files required to implement the CRUD application. Right-click on the CustomersApp project, and choose MyEclipse > Scaffold Spring CRUD application... The first step is to select the type of artifact you want to scaffold from. As mentioned in the introduction there are a variety of possible inputs into scaffolding. For this tutorial we're going to scaffold from a pre-existing database table that comes with the MyEclipse Derby database. Choose the Database Schema option on the Select Artifact Type(s) panel. Click the Next button. The next step is to select the DB connection for accessing the MyEclipse Derby database. This panel will show you all configured DB connections in the MyEclipse workspace, and you must select the MyEclipse Derby connection, which is a preconfigured DB connection in MyEclipse. Click the Next button. The next step is to specify which database table(s) to scaffold an application from. Start by selecting the desired schema, and the select the database table(s) that should be used for scaffolding. When the CLASSICCARS schema is selected, the tables list will be populated with a list of tables. The CUSTOMER table should be added to the scaffolding list. Click the Next button. The next panel will prompt you to select parent objects, and this panel also lets you override the derived name of the Java Object that will be created from the database table. Since we're only scaffolding from a single database table, the Customer Java object must be the parent. For this tutorial there's nothing that needs to be changed on this panel. Just click the Next button.
The next step is to specify which layers of the application should be scaffolded and which package names should be used for each layer. All the layers are enabled by default. Enter org.customerapp as the base package. The package names for the different layers will be automatically derived from the base package. A sub-package (i.e. web, service, DAO, and domain) will be added to the end of the base package. The next step is to specify which web clients should be generated for the web layer. As you can see, there are a variety of different web clients available, including Spring MVC, Spring Web Flow, Adobe Flex, GWT, and iPhone. This tutorial is focused on Spring MVC, so click on the Generate checkbox for Spring MVC. The next step is an optional step to specify the REST scaffolding options. Since REST scaffolding is beyond the scope of this tutorial, we'll just skip to the next step of the wizard. The next step is in an optional step to customize the UI. For this tutorial we'll go with the defaults.
The next step is to specify where the application (source code, configuration files, JSP, etc...) should be generated to in the current project and a few additional scaffolding options. For this panel the defaults are fine. Click the Next button. The final configuration step is to specify the libraries that should be added to the current project, how they should be added (classpath containers or copied into project), and the version of Spring MVC to use. For this panel the defaults are fine. Click the Next button. The final panel will give you a summary of everything that will be generated for you. Click the Finish button to scaffold the application from the information you provided in the wizard.
That's it. Once the wizard is complete you have a ready-to-run Spring MVC application that implements the CRUD application pattern for the domain model (CUSTOMERS DB table). The next step is to see the application in operation by deploying it to Tomcat. The running application can be used for validating the generated Spring MVC components and observing the integration with the other components of the application. To deploy the application, right-click on the CustomersApp project and select Run As --> MyEclipse Server Application. MyEclipse Tomcat will start up. The first page will be a dashboard for accessing all scaffolded web clients. Since this tutorial only scaffolded a single database table for Spring MVC, the only option under Spring MVC is View Customers. Click on it to see generated Spring MVC application in operation. The Spring MVC application can be used to (a) list all customers, (b) view customer details, (c) edit customer details, (d) delete customers and (e) add new customers. The following screen shots show some of the views.
The scaffolded application is compromised of many integrated software components, and the following diagrams provide an overview of which software components were generated and where they can be found in the project. Understanding what gets generated (and where) will help you find the individual or set of software components that you want use in your own developent projects.
The Spring MVC scaffolding blueprint provides a snapshot of what gets generated during scaffolding. The Spring MVC blueprint and the blueprints for the other ME4S code generations capabilities are covered in more detail in the MyEclipse for Spring reference guide. (see Additional Developer Resources).
Now that you have a running Spring MVC application, you may want re-run the tutorial and scaffold different web clients, including Spring Web Flow, JavaServer Faces (JSF 2.0), Adobe Flex, Google Web Toolkit (GWT), and iPhone. You may also want to try the Spring Annotator, JAX-WS Annotator and JPA annotator tutorials which are available in the Eclipse help system and online (see Additional Developer Resources). What was your experience with this tutorial? Share your experience with us by completing a very brief survey. 9. Additional Developer ResourcesThank you for you interest in MyEclipse for Spring. If you are interested in learning more, the following developer resources are available:
News: Code generation for Spring MVC3, JQuery, JPA2 CRUD ApplicationWe are pleased to announce some major improvements in the Spring MVC 3 application that SpringFuse generates. We introduce: - a brand new look'n feel with BluePrintCss and jQueryUI
- a much better navigation covering all associations
- ajax auto-complete instead of select box for many-to-one association
- joda time integration.
More details and screenshots on our blog: http://www.springfuse.com/ 
Celerio is a code generation tool for Java Reverse your database schema
Generate advanced web application using the latest standards in a minute
Code Generation templates available for Spring, JPA 2, JSF 2 + PrimeFaces , Spring WebFlow, Spring MVC 3, etc...
Learn from the code, create your templates, iterate, save weeks!
code generation Try Celerio Online You can freely evaluate the code that Celerio generates on www.springfuse.com using your own database or a sample H2 database that we provide.
Different Simple Simple Simple Celerio is pragmatic. There is no UML, no new language to learn, no new esoteric concepts understand, no specific IDE to use. Celerio leverages existing technologies as you do as a developer.
Does one thing well Celerio is not trying to address all technologies, all applications. It targets Java Web applications based on Spring technologies and Hibernate and it does it well.
Goes beyond the trivial Celerio generated code address advanced topics and use cases.
Use Cases Application rewriting Deciding to rewrite an application is a tough decision. There are often many risks. Celerio helps your existing team make the first move toward your application rewriting.
Jumpstart Celerio allows you to jumpstart new projects in a minute. Developers learn faster.
Prototyping Writing a prototype for free is a common practice in the industry. You have to work fast, for free, and deliver top notch quality to get the deal. Celerio increases drastically your chances to succeed.
http://java.dzone.com/articles/springmvc3-hibernate-crud
News: Code generation for Spring MVC3, JQuery, JPA2 CRUD ApplicationWe are pleased to announce some major improvements in the Spring MVC 3 application that SpringFuse generates. We introduce: - a brand new look'n feel with BluePrintCss and jQueryUI
- a much better navigation covering all associations
- ajax auto-complete instead of select box for many-to-one association
- joda time integration.
More details and screenshots on our blog:
http://www.theserverside.com/discussions/thread.tss?thread_id=62338
2012年1月27日
#
http://kooyee.iteye.com/blog/345606sudo 用来执行命令行(CLI)程序 gksu 用来执行图形的(GUI)程序 GUI = Graphical User Interface CLI = Command Line Interface sudo 是当前用户的home目录,gksu 是root 用户的home目录 sudo gvim 和 gksu gvim 明显不同, sudo gvim 读取当前用户下的 ~/.gvim 配置文件, gksu 读取 root 用户的配置文件,因为当前用户配置文件里设置字体没起作用,:cd 后 :pwd 结果是 /root 所以在系统或程序启动时,没有运行终端CLI,可以用gksu来实行root权限。 su/sudo for CLI commands, and gksu/gksudo for running GUI applications (launched from the command line). In ubuntu gksudo is just a link to gksu, so your always running gksu anyways. You can check for yourself> nautilus /usr/bin
Here's a little known tip, if you run just "gksu" you will get a root run dialog, to run any app as root or other user. 1. In Ubuntu (I suppose in most unix/linux systems), there is a user called root (also called superuser) that has the necessary rights (privileges) to do anything that he wants.
2. In Ubuntu, they have chosen to disable the root user, because any user that belongs to the admin group is able to execute commands as if he was the root user. To execute a command with the same privileges as the root user, he has to put the word "sudo" before the command. (I suppose, sudo stands for SuperUserDO)
3. There is also the command su, that stands for switch user. It is intended to switch from one user to another user in the terminal; the syntax is "su name_of_the_other_user".
4. If you call su without indicating the name_of_the_other_user, su assumes that the other user is the root user. So Ubuntu edgy and feisty simply replaces sudo with su without the name_of_the_other_user, which corresponds to su root. (Question: how can su switch to the root user if the root user is disabled?)
5. gksu and gksudo are in the graphical environments what su and sudo are in the terminal. By the way, I have read in another thread: people should use gksudo in the terminal to launch a graphical application with root privileges; for example "gksudo gedit". It is also possible to use "sudo gedit", but it is not a good way to do it, because gksudo sets up things for a graphical environment, but sudo sets them up for a text environment. (or something like this) ref: http://ubuntuforums.org/showthread.php?t=397398
Development Mode requires the Google Web Toolkit Developer Plugin
Development Mode requires the Google Web Toolkit Developer Plugin At the request of many of our readers, we've created the following tutorial to guide them with the installation of the popular Mozilla Firefox 8 web browser in the Ubuntu 10.04 LTS (Lucid Lynx) and Ubuntu 10.10 (Maverick Meerkat) operating systems. Official 64-bit and 32-bit Mozilla Firefox 8.0 packages are now available for the following Ubuntu distributions: · Ubuntu 10.10 (Maverick Meerkat) · Ubuntu 10.04 LTS (Lucid Lynx) To install Mozilla Firefox 8 on your system follow the next step-by-step (with screenshots) tutorial. Step 1 - Add the Firefox 8 repository No matter what operating system you are running (Ubuntu 10.10 or Ubuntu 10.04 LTS), hit the ALT+F2 key combination on your keyboard, check the "Run in terminal" option and paste the following command in the "Run Application" dialog: gksu add-apt-repository ppa:mozillateam/firefox-stable Enter your password when asked and hit the OK button. A terminal window will appear for a few seconds, and it will automatically close. Hit the ALT+F2 key combination again, check the "Run in terminal" option and paste the following command in the "Run Application" dialog:
gksu apt-get update
Enter your password when asked and hit the OK button. A terminal window will appear for a few seconds, and it will automatically close.
Step 2 - Install Firefox 8
Hit the ALT+F2 key combination on your keyboard, check the "Run in terminal" option and paste the following command in the "Run Application" dialog:
sudo apt-get install firefox
Development Mode requires the Google Web Toolkit Developer Plugin At the request of many of our readers, we've created the following tutorial to guide them with the installation of the popular Mozilla Firefox 8 web browser in the Ubuntu 10.04 LTS (Lucid Lynx) and Ubuntu 10.10 (Maverick Meerkat) operating systems. Official 64-bit and 32-bit Mozilla Firefox 8.0 packages are now available for the following Ubuntu distributions: · Ubuntu 10.10 (Maverick Meerkat) · Ubuntu 10.04 LTS (Lucid Lynx) To install Mozilla Firefox 8 on your system follow the next step-by-step (with screenshots) tutorial. Step 1 - Add the Firefox 8 repository No matter what operating system you are running (Ubuntu 10.10 or Ubuntu 10.04 LTS), hit the ALT+F2 key combination on your keyboard, check the "Run in terminal" option and paste the following command in the "Run Application" dialog: gksu add-apt-repository ppa:mozillateam/firefox-stable Enter your password when asked and hit the OK button. A terminal window will appear for a few seconds, and it will automatically close. Hit the ALT+F2 key combination again, check the "Run in terminal" option and paste the following command in the "Run Application" dialog:
gksu apt-get update
Enter your password when asked and hit the OK button. A terminal window will appear for a few seconds, and it will automatically close.
Step 2 - Install Firefox 8
Hit the ALT+F2 key combination on your keyboard, check the "Run in terminal" option and paste the following command in the "Run Application" dialog:
sudo apt-get install firefox
http://code.google.com/webtoolkit/doc/latest/tutorial/roo-sts.html
|