Christmas and Calorie Counting

Leave a comment

Dear Virtual Journal,

Merry Christmas! Well, in a few days after this posting anyways.

What’s the one thing you like most about Christmas? Jesus and family!

…yes! but whats the other one thing? Presents!

…fair enough! but what’s the other other one thing?

The food and desserts!

More

Tales of an API – Part 1: Where am I?

Leave a comment

Dear Virtual Journal,

As most epics start, we begin en media res, or right in the middle.  I am creating an API to be used by a future web app. Due to the propriety possibility of the application, I will be be very vague at the beginning with major updates in future posts.

Stock API Image

Now that the premise is set, lets get to coding!

…Or not.  This first entry is to show where I am at in my coding journey.  Architecture choices, frameworks, etc.

I am using a basic ASP.NET Web API with some additional add-ons, namely Entity Framework for database communication.  I am choosing to use the REST format for the API, following the conventions outlined in the link below:

https://blog.mwaysolutions.com/2014/06/05/10-best-practices-for-better-restful-api/

I am following a Repository Design Pattern for accessing the code-first Entity Framework entities.  As of right now, most of the CRUD functions are complete.  Within each controller, I am injecting the repository.

Why use “code-first“?  I am a relative novice with Entity Framework.  While I’d much rather do a database from the ground-up, being able to visualize where the code is taking you is far more valuable.  Several times so far I have thought, “oh shouldn’t this actually be related by X instead of Y?” or “why not add this bit of information?”.   Changing tables too frequently can really be a chore.  Add on Entity Framework’s DB-first overhead, and it becomes a coding nightmare.  I will get into specifics in a later post, because it really is the lifeblood of this API.

What comes next is adding in security and the proper authorization for requests to this API.  Since that is relatively modular, it will be featured in its own post, coming soon!

All the best,

Ruda_Chris

Goals, weight, and running.

1 Comment

Dear Virtual Journal,

It’s been a while. Well, forever in this format to be exact.  Plenty of things have changed.  I’ve ran another Chicago Marathon.  I actually placed 1st in my age group for a 5K!  However, most shocking of all, was that I put on a few pounds.

CW: 217

GW: 190

CW and GW are short “Current weight” and “Goal Weight” respectively.

Goal. Now that is an interesting word.

More