190 likes | 299 Views
CSCI 6962: Server-side Design and Programming. The NetBeans and Visual Studio IDEs. Tools We will be Using. J2EE: Glassfish web container Java programming language NetBeans IDE ASP: Microsoft Visual Studio All are free downloads (see textbooks/podcasts).
E N D
CSCI 6962: Server-side Design and Programming The NetBeansand Visual Studio IDEs
Tools We will be Using • J2EE: • Glassfish web container • Java programming language • NetBeans IDE • ASP: • Microsoft Visual Studio All are free downloads(see textbooks/podcasts)
Integrated Development Environment • Environment for all phases of program development • Editing code (with hints) • Compiling code • Running/debugging code • Web development tools • Integrated web container for web site testing • Integrated database server • NetBeans (includes Glassfish server) • MS Visual Studio (includes IIS server)
Using an IDE for Web Development • Client/Server on same computer • Simplest way to develop site • Can export to actual web server later Port 8080 request (to http:// localhost:8080) IDE Web container Dynamicweb page in JSF/ASP Browser Execute code to create page in html start Html page response
The NetBeans IDE • Download and install Java Development Kit (JDK) • http://www.oracle.com/technetwork/java/javase/downloads • Get version withoutNetBeans • Will want to get directly from NetBeans • Download and install NetBeans IDE • www.netbeans.org/downloads • Get version that includes J2EE (web development tools)
Downloading Java • Need Java Development Kit (JDK) • http://www.oracle.com/technetwork/java/javase/downloads • Choose version withoutNetBeans
Downloading NetBeans • Note: NetBeans has built-in Glassfish server(must download Java EE version)
Creating a Web Application • In NetBeans: File New Project • Choose Web and Web Application
Creating a Web Application • Give your project a name (I called this one “WidgetSite”) • Give it a location (I have put it in a directory called 6962) • Make sure it is set as the Main Project
Creating a Web Application • The final page shows information (such as which server this project uses) • Can change to external server if desired
Creating a Web Application NetBeans creates an initial web site Structure shown in the project window Creates an initial index.jsp page (default home page of the new site) The index.jsp is initially just a “Hello world” page
Running a Web Application • Running the site opens the index.jsp page in the default browser
Visual Studio Express • IDE for developing ASP applications • Express version is free download • http://www.visualstudio.com/downloads/download-visual-studio-vsChoose Visual StudioExpress 2013 for Web • Will need to registerwith MicroSoft to usefor more than 30 days
Creating a New Web Site • Choose “ASP.NET Empty Web Site” • Can select either Visual Basic or Visual C# • Can set name/location of site at bottom
Adding a Web Form • Solution Explorer contains files related to application • Right-click site name in Solution Explorer Add New Item
Adding a Web Form • Select Web Form • Choose name of file • Default.aspxdefault initialfile (like index.xhtml)
Editing Web Form • Can insert text into html source of new web form
Viewing the Web Page • Simplest method: Cntrl-F5 • Runs page in default browser