Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Distributed applications DAT075 CHALMERS Distributed Applications The NetBeans IDE Distributed applications DAT075 NetBeans ● An Integrated Development Environment (IDE) supporting many different types of applications – Standalone, Web, Enterprise, Web services, Mobil apps, ... – Targeted at Java but other platforms possible ● – Many languages CHALMERS ● – Example: Ruby on Rails Java, C/C++, Python, Ruby, PHP, Groovy, JavaFX... A framework, new plugins contributed at fast rate. Joachim von Hacht 2 Distributed applications DAT075 Free and Open Source ● Free and Open Source! – ● Time for a applause... Downloads, tutorials, ... at – http://www.netbeans.org/ ● ● CHALMERS ● Have installed at least 20 times has always worked! Robust: Have never lost anything... Written in Java – Runs on Windows, Mac, Linus and Solaris Joachim von Hacht 3 Distributed applications DAT075 Using NetBeans ● ● NetBeans is the only development tool needed in course A highly sophisticated tool and thus... ... you need to spend some time to learn it! – A couple of days to get going! – Please!....visit the labs if in trouble CHALMERS ● Will save you valuable time! ALSO: There are some quirks! Joachim von Hacht 4 Distributed applications DAT075 About Tools ● Why learn a tool? – ● If working in this kind of software business you're probably going to use a tool – CHALMERS ● This is no general knowledge...? Or? Visual Studio, Eclipse, NetBeans, IntelliJ, JBuilder, Studio Creator, Delphi, .... One learned... – Others are similar – Know, what to look for Joachim von Hacht 5 Distributed applications DAT075 Netbeans config data ● First start of NetBeans will create...(will take some time) – ~/.netbeans/6.5.1/ ● ● – ~/.personalDomain/personalDomain ● – CHALMERS Hidden dir for GlassFish V2 (application server) Other dir's/files ● ● Hidden dir in home dir, config info Also holds config data for Apache Tomcat server .netbeans-derby, .netbeansregistration, .asadminpass, .asadmintruststore Always possible to remove all the above to get a fresh installation Joachim von Hacht 6 Distributed applications DAT075 Projects ● ● We always work in projects (NetBeans will create a project) A Project uses a project directory (use suffix .nbp (netbeans project) i.e. myproj.nbp) – Project has (default) same name as the dir – Project dir contains CHALMERS ● ● ● ● Netbeans config files; build instructions, library inclusions,dependencies,... Source code, test code Application config files Possible other files, XML, XHTML, Javascript, CSS,... Joachim von Hacht 7 ● The project directory has a fixed (sub) directory layout – Aka “the development environment” CHALMERS Distributed applications DAT075 Projects (cont.) Joachim von Hacht 8 Distributed applications DAT075 CHALMERS Standalone applications myproj.nbp (proj dir) |--- build (used by NB during buildprocess) |--- dist (final jar file, myproj.nbp.jar) |--- nbproject (used by NetBean) |--- src (your source code i.e. Java files) |--- test (test code) |--- build.xml (ant build file) |--- manifest.mf (used in jar file) Joachim von Hacht 9 Distributed applications DAT075 Web applications (more later...) myproj.nbp |--- (as standalone) |--- web (for HTML, JS, CSS, ...) |--- META-INF |--- context.xml CHALMERS |--- WEB-INF |--- web.xml |---- build.xml (build file) Joachim von Hacht 10 Distributed applications DAT075 CHALMERS Project view, Project tab ● Projects tab – Many dirs and files handled by NetBeans don't need to see – NetBeans provides a “logical view” of the project, the components and files we normally need. Joachim von Hacht 11 ● Files tab – View everything in project (files and dirs) CHALMERS Distributed applications DAT075 Project views, Files tab Joachim von Hacht 12 Distributed applications DAT075 Centralized services handling ● NetBeans can act as a central for managing services – Servers, start/stop/inspect, ... – Databases start/stop, execute database operations (SQL) – Web services Testing webservices CHALMERS ● Joachim von Hacht 13 ● Services tab CHALMERS Distributed applications DAT075 Project views, Services tab Joachim von Hacht 14 Distributed applications DAT075 Wizards and templates ● When building an application – Use the application type wizard to get a runnable skeleton for that specific type ● – File > New Project Add files etc ● CHALMERS ● Mark insertion point (CAREFUL) Right click > New ... Joachim von Hacht 15 Distributed applications DAT075 Refactoring ● ● Changing – Locations (packages) – Names – .... Always from inside NetBeans Working in file system simultaneously can cause problems CHALMERS – Joachim von Hacht 16 ● Multiple projects possible ● Subversion and other support – ...much, much more – Inspect Tools > Plugins CHALMERS Distributed applications DAT075 Multiple projects and more... Joachim von Hacht 17 ● Quick live demo CHALMERS Distributed applications DAT075 Netbeans Live Joachim von Hacht 18 Distributed applications DAT075 Problems ● Problems (are rare) possible solved by editing a files in /nbproject dir. – Consult assistants! – Possible serious problem ● If nbproject/build-impl.xml trashed.... – CHALMERS ● ...nearly impossible to restore by hand, Always possible to recreate a project if you have the sources Joachim von Hacht 19