Posts

Showing posts with the label JavaEE

Social network exercise - part1

Image
[UPDATE] - This one is on hold for now. Due to other activities and projects I do not have much time to get involved in it. But database is done ( or at least it's functional for now ) and it's the largest one I've built so far ( 15+ tables ?! ). Frontend is also done for existing pages but I will probably redo it with Angular and SASS or LESS. And yes, some Backend functionalities are done also. Code is not ready to be shown to the world :D  *** Just a concept I've started working on. For now there are only three pages: Login/Signup, Profile and Account settings. Frontend is mostly done. It's simple but needs a few more tweaks + Js/jQuery sweetness. I need to redo a login page cause it's way too ugly. After that going to MySQL and Backend. I should have used SASS!

Web Weather Application

Image
This one is not really finished yet. I still want to make a daily or/and hourly forecast. That is why so much space was left empty. Model was created from  my weather application , that I've done before, and Controller and View were developed rather quickly which resulted in not so spectacular UI and functionalities. djordje.webweatherapp.model.Weather.java /* * Web Weather Application - Maven / Spring Web MVC */ package djordje.webweatherapp.model; import net.aksingh.owmjapis.CurrentWeather; import net.aksingh.owmjapis.OpenWeatherMap; import org.json.JSONException; /** * * @author djordje gavrilovic */ public class Weather { private int cityID; private String cityName; private String description; private String temperature; private String pressure; private String humidity; private String wind; private String iconID; public int getCityID() {return cityID;} public void setCityID(int cityI...

Web service for translating between two languages

Jersey REST service for translating between two languages. It's just a basic concept but it's working. web.xml 1: <?xml version="1.0" encoding="UTF-8"?> 2: 3: <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" 4: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 5: xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" 6: version="3.1"> 7: <display-name>TranslateWS</display-name> 8: <servlet> 9: <servlet-name>Jersey REST Service</servlet-name> 10: <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class> 11: <!-- Register resources and providers under com.vogella.jersey.first package. --> 12: <init-param> 13: <param-name>jersey.config.server.provider.packages</param-name> 14: <param-va...

XML parsing with XPath

Parsing and extracting data from XML file with XPath. The output displays detailed information on all books whose price is higher than 10, which were published after 2005. bookCatalog.xml 1: <?xml version="1.0" encoding="UTF-8"?> 2: <!DOCTYPE root SYSTEM "bookCatalogDTD.dtd"> 3: 4: <catalog> 5: <book id="bk101"> 6: <author>Gambardella, Matthew</author> 7: <title>XML Developer's Guide</title> 8: <genre>Computer</genre> 9: <price>44.95</price> 10: <publish_date>2000-10-01</publish_date> 11: <description>An in-depth look at creating applications 12: with XML.</description> 13: </book> 14: <book id="bk102"> 15: <author>Ralls, Kim</author> 16: <title>Midnight Rain</title> 17: <genre>Fantasy</genre> 18: ...

Employee management system 2

Image
This is a bit enhanced version of employee management system project that I've done before. The GUI is generally the same, except that the data is now displayed inside tables and some colors are changed. Important thing is that ORM is done with Hibernate and HQL.  The code is shown for just two frames (PrikazFrame and IzmenaFrame) out of 5. hibernate.cfg.xml 1: <?xml version="1.0" encoding="UTF-8"?> 2: <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> 3: 4: <hibernate-configuration> 5: <session-factory> 6: <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> 7: <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> 8: <property name="hibernate.connection.url"...

Web shop app

Spring Web MVC app for a online shop, with MySQL db. It lacks sophisticated GUI but it works. Application has 3 pages: buyers (kupci), products (proizvodi) and sales (prodaja). Plus Index page. On Proizvodi page you have a possibility to create, delete or update a certain product. You can do the same with buyers on the Kupci page. Selling a particular product to a particular buyer is possible on a Prodaja page. Each sale involves updating the status in the product table as well in the table with customers. index.jsp 1: <%@page contentType="text/html" pageEncoding="UTF-8"%> 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 3: "http://www.w3.org/TR/html4/loose.dtd"> 4: 5: <html> 6: <head> 7: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 8: <title>WEB PRODAVNICA</title> 9: <style> 10: bo...