Spectory Blog

Angular 2 with Rails and Webpacker

By Amitai B, Nov 19 2017

I love Rails, I think it’s the best web development platform, at least from a developer point of view (DX). But it is not perfect. One of its major disadvantages is when you try to use it with one of new modern JavaScript framework (React, Angular, Vue…). There is no “Rails” way to do it. You need to start messing with configurations and settings, all the things that Rails trying to avoid. Writing a web application in Rails traditional way would be using ActiveViews, and add a little JQuery when you need JavaScript in the client. But when You want to write a single page application (SPA), it’s just not good enough.

Read More

Let your job do your job

By Tomer S, Nov 16 2017

We live in a busy world.

Read More

Concurrency control in web development

By Dan Y, Feb 26 2017

One of the foundations, when talking about applications related to ecommerce, finance etc. is Consistency. Consistency is one of the transaction database properties called ACID (Atomicity, Consistency, Isolation, Durability). It means that a transaction either creates a new and valid state of data, or, if any failure occurs, returns all data to its state before the transaction was started. Sometimes we tend to think that the database takes care of concurrency issues automatically but unfortunately we are wrong… It’s true that most of the relational databases do support ACID foundations but if we don’t handle it properly in the application server side, we may encounter concurrency problems when more than one user is working on the system.

Read More

Express like its ROR

By Guy Y, Dec 10 2016

Ruby on rails supply a big tool set that allows rapid development right out of the box.

Read More

Factory girl the Story of Goldilocks and the Three Bears

By Tomer S, Sep 29 2016

Just like in the story of Goldilocks and the Three Bears, in our code- guests are welcome, mystery guests aren't.   While we are testing our application , we need to challenge the logic and design of our code. In order to do so efficiently we will increase the power of our unitests by making it faster and by testing all parts of the code. Testing is an integral part of code writing. Unitests of Web applications need to test both the server side and the client side. The challenge of testing the server side is the decrease in performance speed due to the writing to database. As a Full Stack developer it is very important to conduct the tests in a convenient way, without compromising on quality. This is the main goal of FactoryGirl.      

Read More

Access Your Development Machine from the Internet

By Danny M, Aug 4 2016

Sometimes it can be very convenient to access your local development machine from the public network. Setting up something like this can be inconvenient. Your office network is usually shielded from the internet with a router and a firewall and IT managers generally disapprove opening these up for public inbound traffic. You many be able to configure your home router to forward tragic to your machine, but the process is no fun.

Read More

Sending Emails through Web Applications

By Tomer S, Jul 20 2016

At the start of the first lecture at the university, the Professor introduced himself, then turned to the students: "in case anyone was confused and did not understand until now, this course deals with Calculus". Ten students found out they came to the wrong class. I felt the same unpleasant feeling that these students felt, when I discovered a few weeks ago that e-mails sent through the app got into Spam instead of "Inbox".

Read More

ActionCable in Rails 5

By Amitai B, May 14 2016

One of the most interesting features that will be released in Rails 5 is action cable. Action cable adds a very important capability to Rails as part of the framework which is WebSockets. In this post, I will explain the advantages of using WebSockets, when to use them and how.

Read More

GraphQL and Rails

By Amitai B, Apr 20 2016

Before the invention of the web, if we wanted to build an application that communicates with other application, it was very complicated. We needed to read long documents such as ICD (interface control document) or other communication protocols and develop the interface layer our own. If the other application was written in other language it was even harder, sometimes the best solution was to get a library of the code and include it in our project.  After the invention of the web, it was decided that there should be a better way, and we should have a standard way to perform this communication without the tight engagement. HTTP and XML was mature enough and ‘web services’ were invented.

Read More

Materialize Your PostgreSQL Views

By Amitai B, Mar 26 2016

I value performance a great deal. I believe a web application today should be as responsive as possible. The user's patience for latency is close to none. It is easier when the application renders static pages, but what should we do when the application has to present the results of complex calculations or analysis? In order to display the data fast we cannot run the calculation on demand. It just wouldn't be fast enough.

Read More