A Request Refactor 

Task: Same Same

React, Java/Spring-Boot, Hibernate, SQLServer

React, Node, SQL, SQLServer

1 Week

All SQL in 1 file

Websocket and Rest

Messaging

On and Off the Bus

[Actor-Model]

Configuration: DB streaming

{
  "PROGRAMS_STREAMING": false
}

A postman-like example file

http://localhost:8090/
###
http://localhost:8090/data/programs?where=where%20program_id%20=%20113
###
http://localhost:8090/data/program/?program_id=370
###
http://localhost:8090/data/outlets/?outletNameStartsWith=NC%20R
###
http://localhost:8090/data/programevents/?program_id=370
###
http://localhost:8090/data/programeventmappings/?program_id=424
###
http://localhost:8090/data/programpricelevels/?program_id=424
###
http://localhost:8090/data/programpricelevelsmappings/?program_id=424
###
http://localhost:8090/data/programoptions/?program_id=370
###
http://localhost:8090/data/programoptionsvalues
###
http://localhost:8090/data/targeteventsafter/?outlet=4259&startDate=2022-04-05
###

// CREATE, UPDATE, DELETE  Note: DEBUG setting
POST http://localhost:8090/data/programeventmappingcreate HTTP/1.1
content-type: application/json

{
  "fields": {
    "request_event_id": 196579,
    "target_event_id": 196580,
    "program_id": 443,
    "sequence": 7
  },
  "DEBUG": true
}

###

POST http://localhost:8090/data/programeventmappingupdate HTTP/1.1
content-type: application/json

{
  "updates": {
    "request_event_id": 196582,
    "target_event_id": 196580,
    "sequence": 22
  },
  "program_event_mapping_id": 1214,
  "DEBUG": true
}

###

http://localhost:8090/data/programeventmappingdelete/?program_event_mapping_id=1228&DEBUG=true
###

POST http://localhost:8090/data/programpricelevelmappingcreate HTTP/1.1
content-type: application/json

{
  "fields": {
    "request_price_level_type_id": 664,
    "target_price_level_type_id": 6,
    "program_id": 424,
    "rank": 7
  },
  "DEBUG": true
}

###

POST http://localhost:8090/data/programpricelevelmappingupdate HTTP/1.1
content-type: application/json

{
  "updates": {
    "request_price_level_type_id": 1,
    "target_price_level_type_id": 6,
    "rank": 3
  },
  "program_seat_preference_mapping_id": 355,
  "DEBUG": true
}

###

http://localhost:8090/data/programpricelevelmappingdelete/?program_seat_preference_mapping_id=480&DEBUG=true
###

A postman-like example file

// CREATE, UPDATE, DELETE  Note: DEBUG setting
POST http://localhost:8090/data/programeventmappingcreate HTTP/1.1
content-type: application/json

{
  "fields": {
    "request_event_id": 196579,
    "target_event_id": 196580,
    "program_id": 443,
    "sequence": 7
  },
  "DEBUG": true
}

###

POST http://localhost:8090/data/programeventmappingupdate HTTP/1.1
content-type: application/json

{
  "updates": {
    "request_event_id": 196582,
    "target_event_id": 196580,
    "sequence": 22
  },
  "program_event_mapping_id": 1214,
  "DEBUG": true
}

###

http://localhost:8090/data/programeventmappingdelete/?program_event_mapping_id=1228&DEBUG=true
###

POST http://localhost:8090/data/programpricelevelmappingcreate HTTP/1.1
content-type: application/json

{
  "fields": {
    "request_price_level_type_id": 664,
    "target_price_level_type_id": 6,
    "program_id": 424,
    "rank": 7
  },
  "DEBUG": true
}

###

POST http://localhost:8090/data/programpricelevelmappingupdate HTTP/1.1
content-type: application/json

{
  "updates": {
    "request_price_level_type_id": 1,
    "target_price_level_type_id": 6,
    "rank": 3
  },
  "program_seat_preference_mapping_id": 355,
  "DEBUG": true
}

###

http://localhost:8090/data/programpricelevelmappingdelete/?program_seat_preference_mapping_id=480&DEBUG=true
###

Time to see code...

Transparent

Simple

Timeless

Efficient

 

Taking the magic out of code is cool too.

or is this another case of...

Jon Tiemann

  • Experience in many languages
  • Database experience since Codd and Date
  • Team Building through passion and curiosity
  • Sharing and Pairing
  • Mentoring and being Mentored
  • Writing maintainable, long lasting code
  • Actor Model advocate
  • Ask about Mel B JS Messaging Micro-Framework

deck

By Jon Tiemann

deck

  • 48