Coder Social home page Coder Social logo

angular-upload-dropwizard's Introduction

Neosavvy Commons User Angular and Backbone

Purpose

The purpose of this little sample is to provide a quick analysis of two common javascript frameworks in use today. Angular is a new framework from some guys at Google and Backbone is from a bright young fellow at the NY Times.

The sample includes a simple Java based CRUD implementation for Users and was built using the DropWizard framework of Yammer

Read about DropWizard here Read about Angular JS here Read about Backbone JS here

Setup

To setup Dropwizard and build you will need to make sure you have Maven 3.X installed. After you have followed the instructions for setting up Maven then you should be able to open a terminal and execute the following:

./recompileAndRun.sh

This should fetch all the Java dependencies and start the server running on port 8080. I also use MAMP to provide some hooks to Apache and MySQL in one nice clean package. You are welcome to use Apache and MySQL installed on their own but they require the following settings:

ProxyPass settings should be added to the advanced tab of MAMP for your server

ProxyPass /backend http://127.0.0.1:8080/backend ProxyPassReverse /backend http://127.0.0.1:8080/backend

I also set my server up to be called local.commons-user.com and hopefully I don't have any hard coded references to that NameVirtualHost, however if I do please point them out.

To create your database use the following create table script:

CREATE commons; USE commons; CREATE TABLE user (  id int(11) NOT NULL AUTO_INCREMENT,  firstName varchar(1024) DEFAULT NULL,  lastName varchar(1024) DEFAULT NULL,  email varchar(4096) DEFAULT NULL,  PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=10;

I also created a user with name "commons" password "commons" with full rights on this database.

You should see that when you execute the run.sh script that your sever starts and when you browse to the following two URLs you are greeted with a simple UI.

Backbone: http://local.commons-user.com/backbone/ Angular: http://local.commons-user.com/angular/

Please give my blog post a read and comment if you have any questions or other things to say.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.