Shit I did with AngularJS

Because it was so hype

May 2015

Last year

I like to code

I also like when it writes (almost) itself

 

because it means more time to do whatever I like

And I'm an economous guy

  • Spreadsheet-generated
    • SQL
    • JSON
    • Java
    • Javascript (Cordova js out of Java methods)
  • Java class main() redirected to file
    • System.out.println
    • Template engine 
  • ...

The point

was to write repetitive code. Because SPRING

Endpoint, Service, Dao

 

Times two because interfaces.

Extra POintS

  • Automating it
  • learning hypee AngularJs
  • getting less bored

So, I IMPLENTED
THAT FLOW

The actors

  • A user : a developper
  • A lonely AngularJs page
  • A servlet

The user

Types the name of a stored procedure and validates the form.

The Backend

Gets the JDBC meta data of the input needed for the stored procedure.

And returns it to the page

The PAGE

Displays a renewed form, with inputs for the SP parameters

The USER

Inputs the SP parameters

The BACKEND

Executes the SP and analyzes the resulting resultsets

 

It returns JSON describing a new form

The PAGE

Updates its form with more input fields, pre-filled. Each line has a java name, a java type as inputs and the jdbc column name and type as reference.

 

As the user types, the page's content (java classes) self updates by the grace of AngularJS's binding.

 

 

And ...

The user (me) copies, pastes the code in the ide

Leaving office at decent hour

And having a better work-life balance

Thank you for reading

@wadael

PS: Now I use JBOSS FORGE

FOR SERIOUS STUFF

OR SPREADSHEET FOR ONE SHOTS

PervertedAngular

By Jerome

PervertedAngular

The story of why and how I wrote some AngularJs that writes Java code.

  • 1,692