Good evening gents,Firstly, excuse me as I am a novice in this area and a network engineer by day, not a developer. I’m sorry if this is a long shit post to you pro’s, but Reddit always has helpful people and hope to find that here too.I have been building and maintaining what is essentially an advanced find and replace web app for generating network gear configuration files. I have a MySQL database with all of the common data elements and a user form to POST and GET the relevant db info and smash together into a skelton base config and present the text file to user. Works great using PHP, minimal JS, and mysqli queries for my department for over a year. Basic stuff, one source of truth, consistency that 10 excel docs floating around wouldn’t accomplish.My company wants to use it everywhere now and have the ability to use the data for other projects and linked me up with a consulting company who immediately said you need a REST API so we can consume it and write our front end etc etc. OK a week of agonizing through Swagger to create endpoint docs and then write PHP functions to respond to them serverside because it’s easiest language I know, manually by hand (23 GET’s in total and applicable JSON replies). However, now I’m to the point where I need to serve the API to a bigger audience and also potentially consume it in my front end and replace the SQL calls. I don’t know that PHP is my best option to scale this up and isn’t known for efficiency.Swagger let’s me export stubs for multiple languages and seemingly creates an entire client in just as many languages, but NodeJS is talked about like it’s the holy grail in this aspect. I’m considering giving it a shot because long hand PHP and HTML bootstrap forms and tables are taking too much of my time as a off the side of desk project. I don’t know if I should use Unirest or if there is another beginner library that can help get me to speed quicker for replacing sql calls in my front end? Any easy buttons that do the server builds with a compliant swagger 2 or OpenAPI 3.0 yaml file I have worth checking out?I don’t know that the swagger server stubs will be enough for me to start a new language from scratch and rebuild my front end in a timely manner, so looking for a way to get my feet wet and keep the project moving forward. I feel like the templating engine aspect could eventually be the key to me supporting many more device types and rapidly developing them so that aspect of Node appeals to me as well.Cliff notes: -PHP, MySQL, Bootstrap, Swagger, all done by hand doesn’t scale when it’s not your day job. -At point where rewriting some code in new language is worth it to gain future ease and speed to deploy new device type support for my team and meet company demand to consume my current db data. -Every google search for “easy REST API” has NodeJS in the title lol figure you guys have to be on to something worth exploring. Nothing was easy about my way.
Submitted December 05, 2018 at 04:01AM by netopsengineer
No comments:
Post a Comment