Git Product home page Git Product logo

2015.java2days's Introduction

2015.java2days.base

Base module for conference talk at java2days 2015, Modularize your Angular application in two weeks

This application has 3 branches which demonstrates 3 types of app that were demonstrated on Java2days 2015. full-demo-without-modules - Full app before modularizing empty-app - container and base module of the app full-demo-without-modules - demo app before was modularized, the code is already splited modularized-app - app with added all submodules

To build the app you will need need to clone this repo

This app is example app with a lot of tips and tricks how to make modularized app. This is container of the app which is the skeleton of the project. Business logic is stored in src/app folder. You have 4 business modules which represent the business logic for a restaurant (table, starter, meal, dessert). All of this business modules are actually git repos:

To run this project you will need to add this repo as submodules and the root folder for all of them is src/app. It should look something like this:

root of the app/
    src/
        app/
          base
          dessert
          starter
          meal
          table

The common modules represent modules that can be used in any other app. They need to be placed simmilary like the business modules. Here are the business modules and the structure how to place them as submodules in your empty-app project:

 root of the app/
    src/
      common/
          menu
          configuration
}}

These 2 common modules are example how to make dynamic menu that is built with gruntscript and in configuration you have an example how to register the modules in generic provider that will have all of the modules.

Important to note is that file modules.json needs to be placed on root of the empty-app. That is configuration json file which containts all of the business modules which are basically definition of the app you are building. In modularized-app branch you can find the full demo as a reference how the app should look like.

In order to build the app after you clone the this repo swtich to empty-app branch, add all of the submodules, modules.json file you will need to make:

npm install
bower install
grunt build

These 3 commands will build the app and will create the app in dist folder. You can run the app with oppening index.html file.

Features that you can find in this project for modularized app:

  • dynamic registering of angular modules
  • dynamic creation of menu
  • distributed sass files for building your css based on the modules present
  • registration of your modules in dynamic provider and making the accessable thoughout the app
  • directives for displaying something on your homepage
  • compiling your htmls into angular module for increased speed
  • and much more (you need to explore the Gruntfile.js to see all of the magic that is present :))

Presentation: http://www.slideshare.net/gorankopevski/modularize-angular-js-apps-java2days-2015-54680898

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.