Skip to main content

Posts

Showing posts from December, 2018

NodeJs Working Mechanism

Nodejs is an environment built with Google's V8 engine to run javascript code outside of the browser (i.e in the server side). It is single threaded unlike other server side technologies like Java and PHP. They open new threads for each request; but with Nodejs all of this happens on a single thread with even shared resources.  All of the operations that a developer does on a server built with Nodejs happen asynchronously and that means it does not take a specific amount of time. So, to work this method we use something called callbacks; which are anonymous functions that we pass to a function so that it will be executed once the first function finishes executing. ┌───────────────────────┐ ┌─>│ timers │ │ └──────────┬────────────┘ │ ┌──────────┴────────────┐ │ │ I/O callbacks │ │ └──────────┬────────────┘ │ ┌──────────┴────────────┐ │ │ idle, prepare │ │ └──────────┬────────────┘ ┌───────────────┐ │ ┌──────────┴────────────┐ │

CRUD in Databases

CRUD is short for the basic operations that can be done on relational databases in general: Create, Read, Update and Delete. We have dealt with CRUD applications a lot during this time period at RBK. Mostly while working with html forms and mapping their requests to a server that is connected to a database that does these operations.

Databases and ORMs

ORM or Object-relational mapping is a method to access and manipulate objects without having to consider how such objects relate to their data sources. With ORMs the code needed to manipulate our data is encapsulated and hidden in a way that we don't need to work with SQL directly; we just interact with the object in the same language we're using. ORMs provide the user with many advantages such as: It saves a lot of time thanks to writing DRY code and MVC code and you're not supposed to write poor SQL statements. And it's more flexible. As for the weak points, they're not lightweight tools and we need to learn them. Also SQL does better in big projects than them. Examples: 1- Javascript: Sequilize, Bookshelf.js and Mongoose 2- Java: Hibernate. 3- C#: Entity Framework And to conclude this blog I'm going to say that we shouldn't always go for ORMs but instead try working with SQL implementations like MySQL and others. It all depends on the specific

Middlewares

Middlewares in Javascript are functions that come in the middle of the request-response cycle. They have access to both the request and the response object as well as the next middleware function to be executed; usually called next(). Popular examples on middleware include: body-parser, cors, session, cookie-seesion and cookie-parser.

Relational Databases

Relational databases are, well... a collection of data items that have relations between them. These relations are made by associating a one table's primary key with another table's foreign key. It is a great advancement from the old long table that was used to store data which was inefficient in terms of search, memory and space.  And as for normalization; it means a process in which tables are structured to eliminate redundancy and repetition among data and the CRUD operations side-effects. And as a direct result we improve the performance of our queries. An example of a relational database would be two tables; one for student and the other for school. Both of these tables have a column for the school id, and so we make a connection between by assigning the first one as a primary key and the other as foreign key.

Docker

I knew Docker couple years ago but I never had the chance to work with it. All that I knew was that it's a software used in production/deployment of applications to help in making a single file for all of the application's dependencies and required packages. Imagine once you finish building your full stack application with the MEAN stack and you're ready for deployment, then you're gonna need something to aid you in the process and make it automated; like Docker.

Greenfield Project

This is a project where me and other three people joined forces to build it together. It started with meeting each other on the first day to decide on the project idea. After a couple hours of brainstorming we finally decided on a particular thing to do; and it was a web app to help manage a school system. This app was aimed at teachers, parents and students, in addition to admins moderating the system. We started big and worked our way through the waffle tasks but got overwhelmed along the way since it was a very big project for both our limited time and our team members' technical abilities. We faced many difficulties while working on this project; especially setting up mysql and getting it to work on all of our team members' machines. We switched to setting it up locally because the website we used to host our database kept showing an error of too many users so we kept testing locally until we hosted it online on a different website before the end of the time period. We work

Commitment In My Point Of View

Being committed for me is all about following the rules and not trying to break any during the period I'm at that place or doing that thing. Showing up early, preserving energy for that commitment, doing everything I can to prove that I'm fully committed and what I do is important are all aspects of what makes me committed/serious in the eyes of other people. I try my best to always act professionally and I think I'm doing that most of the times, but I hope I can be better than that.

My Experience Working In A Group Project

It wasn't the best experience I had but everything comes with ups and downs. I learned more about how to work within a team and how sometimes tasks won't be completed while the deadline keeps approaching steadily. We should learn from all our experiences; both good and bad. My initial reaction was that I didn't think that things would work in this group but we managed anyway and we were able to deliver a basic project. I hope that the thesis project experience will be a lot better than this one. I actually learned multiple stuff and I'm grateful for that.