Shortlink

A Sample CRUD Program and API

Over the next few months I plan on writing a simple CRUD program in different languages, sometimes with a separate frontend and backend, other times as one program. The whole goal of this will be as a learning experience for me.

So for starters, I will do a simple address book.

So for this we will need a field for First name, Last name, Mailing Address, City, State, Zip, Phone(s), and Notes.

An API will also be established, with the URL playing a role. So for starting out I should be able to retrieve a listing of all entries, showing First name, Last name, and Phone. So when I call /contacts I should see this list.

Then for getting a single entry I should be able to call /contact/# with the # being the ID number given to me by /contacts.

For adding an entry, the save function should be /contact/create, with the update function calling /contact/#/update.

Finally, for deleting an entry it should call /contact/#/delete.

Depending on the language the end-points may change. Starting out I plan on using JSON for any data transfers, so all the URLs will be prefixed with /json-api. In the end for the ones with the decoupled front and backends, you should be able to swap any frontend with any backend and the program should still work.

API URL Action
 /contacts  List all Contacts
 /contact/create  Create a Single Contact
 /contact/#  View a Single Contact
 /contact/#/update  Update a Single Contact
 /contact/#/delete  Delete a Single Contact
Shortlink

Well, I need to improve my skills

For myself I have a desire to learn, mainly about computers. Which is a field that is always evolving and changing. Wait to long and risk your skills being outdated. I consider myself an intermediate PHP programmer, with a beginner’s knowledge on MySQL, HTML, and JavaScript. Yet I want to improve my skill set even more, and not just to Websites. I want to become an Intermediate Java programmer or C++, can not fully decide which one.

Then on improving my Website skills I can not decide which direction. To different languages such as Ruby, or ASP.NET or should I master PHP then conquer the HTML/JavaScript issue. I could learn a Browser-based toolkit/framework such as Dojo, or JQuery/Bootstrap. The options to pick are numerous.

Well I guess I better start the only way I know how. To give each option a fair shot. I should ether get books, watch videos, message board posts, or even the documentation sites of the options I feel I have. At the end (if that will ever happen) then not only will my own skill set improve, but hopefully it will make deciding between the options I covered easier.