1 - Getting Started with Java EE 6 ➔ Java EE 6 and NoSQL in Cloud Part 2 - Getting Started with MongoDB ➔ Java EE 6 and NoSQL in Cloud Part 3 - Getting Started with OpenShift Cloud
stories or Features 1. As an Employer , I should be able to register my company 2. As an Employer, I should be able to post jobs 3. As a Job seeker , I should be able to register myself with application 4. As a Job seeker , I should be able to search jobs near to my current location. 5. As a Job seeker , I should be able to apply a job 6. Etc... STEP 1 : DEFINE YOUR IDEA
an Employer, I should be able to post jobs – As a Job seeker , I should be able to search jobs near to my current location. – As a Job seeker , I should be able to apply a job STEP 1 : PRIORITIZE
I should be able to post jobs – 1 day – As a Job seeker , I should be able to search jobs near to my current location. - 3 days – As a Job seeker,I should be able to apply a job - 1 day STEP 1 : ESTIMATION
are classified four classes. STEP 2 : CHOOSE PROGRAMMING LANGUAGE Declarative Language Object Oriented Language Functional Language Imperative Language Declarative programming languages describe a problem but they usually do not say how the problem should be solved. Examples are Prolog, XSLT, LISP and SQL Object-oriented programming languages place data and functions that change data into a single unit. This unit is called an object. Most modern programming languages are object- oriented. Examples are Java , C++ , C# etc. Functional programming looks at programming like a function in mathematics. The program receives input, some information, and uses this information to create output. Examples are Scala , Clojure , F# etc You always write what is supposed to happen next. Even if there are more choices, e.g. based on the user's input, it is always: you ask about the input when you want to ask, then you choose what happens next based on the answer you received. For example C , Basic , etc.
PHP's older sister ... • Ruby is the cool girl • Python is Ruby's more sensible sister ... • Java is a successful career woman .. • C++ is Java's cousin ... • C is C++'s mom... • Haskell, Clojure, Scheme and their friends are those hipster, artsy, intellectual girls .. http://b.qr.ae/RUc3w7 STEP 2 : PROGRAMMING LANGUAGE IN LAYMAN TERMS
programming language. • Java applications are typically compiled to bytecode (class file) that can run on any Java virtual machine (JVM) regardless of computer architecture. • Java was originally developed by James Gosling at Sun Microsystems – JDK 1.0 (January 21, 1996) , JDK 1.1 (February 19, 1997) , J2SE 1.2 (December 8, 1998) , J2SE 1.3 (May 8, 2000) , J2SE 1.4 (February 6, 2002) , Java 5.0 (September 30, 2004) , Java SE 6 (December 11, 2006) , Java SE 7 (July 28, 2011) You can also try Java Online http://www.tryjava8.com/ STEP 2 : JAVA FACTS
standards-based platform for developing web and enterprise application. • Java EE extends the Java Platform, Standard Edition (Java SE), providing an API for object-relational mapping, distributed and multi-tier architectures, and web services. • Consists of 28 specifications (Thousands of pages) • Convention over configuration • Less boilerplate code • Promotes POJO programming model • Annotations and types over XML STEP 2 : JAVA EE
is a Java programming language API that provides support in creating web services according to the Representational State Transfer (REST) architectural pattern. • POJO based annotation heavy • Everything is a resource STEP 3 : JAX - RS
dependency injection in Java EE platform. • Provide two main things – Dependency Injection – Manages components in scope • Leads to loose coupling and strong typing using annotations STEP 3 : CDI
documents Schema-less – Each document is heterogeneous, and may have completely unique structure compared to other documents Fast and horizontally scalable Rich query language Rich documents Easy to get running Geospatial indexing STEP 4 : WHAT IS MONGODB
MongoDB jobs near me – Proximity Queries Find all the MongoDB jobs within Bangalore – Bounded Queries Find all the MongoDB job at this location – Exact Queries • Supports only two dimensional indexes. You can only have one geospatial index per collection. By default, 2d geospatial indexes assume longitude and latitude have boundaries of -180 inclusive and 180 non-inclusive (i.e. [-180, 180)) GEOSPATIAL INDEXING BASICS
: [ 50 , 30 ] } //SUGGESTED OPTION { loc : { x : 50 , y : 30 } } { loc : { foo : 50 , y : 30 } } 1) { loc : { lon : 40.739037, lat: 73.992964 } } 2) Make a 2d index db.places.ensureIndex( { loc : "2d" } ) 3) If you use latitude and longitude as your coordinate system, always store longitude first. MongoDB’s 2d spherical index operators only recognize [ longitude, latitude] ordering. HOW TO MAKE IT WORK
to write code. • You develop “Cloud Aware” applications from the beginning. • Improves developer productivity. • Reduces cost and time to market. • Brings agility to product development. • Gives developers the power to prototype their ideas rapidly.
other tasks you can do with rhc – tail log, app management, cartridge management , ssh management , namespace management, etc. Run rhc -h for details DEMO : LOCALJOBS APP RHC is only required for infrastructure tasks
git pull -s recursive -X theirs upstream master ITS All GIT Source code is managed using Git Source code https://github.com/shekhargulati/localjobs-jee