Spectory Blog

MV* patterns with React Redux

By Guy Y, Feb 27 2017

The main promise of react & React Native is code reuse. But As Aaron Greenwald states in this wix talk, it not free. When done right you can achieve a very high code reuse percentage between your IOS, Android and Web apps.

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

ES6 Generators

By Amitai B, Feb 4 2017

One of the more complicated notions presented in ES6 is generators. This is a feature with a lot of power that enhance the JavaScript language, especially in areas such as asynchronous programing.

Read More

Dynamic Data visualization with D3 and Rx part 2

By Amitai B, Dec 23 2016

In part 1 I introduced D3. in this part I will show how to dynamically update the graph with Rx.

Read More

Dynamic Data visualization with D3 and Rx part 1

By Amitai B, Dec 23 2016

D3 is a javascript library for data visualization. RxJs is a reactive programing model that allows to compose asynchronous stream of data. Anyone of those library are is very powerful. Together their power twice itself and can be used to build incredible things.

Read More

JWT Like ACDC

By Guy Y, Dec 18 2016

JSON Web Token is a self-contained way for securely transmitting information between parties as a JSON object.

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

Using this in react

By Amitai B, Dec 1 2016

JavaScript is great, but comparing to other programing languages it has many confusing parts. One of them is the use of this.

Read More

React and Redux Tutorial

By Amitai B, Nov 18 2016

What is React? React is a JS library for rendering web pages. That’s it. The closest equivalent is Angular with only directives without the other features such as services, controllers etc.

Read More

Async tests with mocha in node

By Amitai B, Nov 3 2016

Node JS is Asynchronous. It's a pain. It’s a pain developing this way and it’s a pain writing tests for this framework.

Read More

Let it crash!

By Guy Y, Oct 23 2016

At this blog post we'll discuses one of Elixir greatest features - Supervisors & Supervision trees, the engine behind Elixir's let it crash motto.

Read More

NewSQL databases

By Amitai B, Oct 5 2016

Fifteen years ago, one database was enough to hold all the application’s data. Over the years, applications started to collect more and more data, from people, devices, events, etc. The single instance could not hold this amount of data and the throughput of usage, it needed to be scaled.

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

System monitoring with InfluxDB vs Elasticsearch

By Amitai B, Sep 27 2016

Monitoring computer systems had been always important. It helped us know the system’s health, identify problems, and even to forecast them. 

Read More

Why React-Native is Awesome

By Noam B, Sep 22 2016

Basically it’s just React but for mobile. That’s it.

Read More

Improve your web application security

By Amitai B, Sep 5 2016

If you want your web application to be bullet proof with no vulnerabilities at all, do not write it. There is no software that cannot be hacked, it is just a matter of resources and time, as proved many times.

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

Diving into JavaScript Closures

By Amitai B, Jul 27 2016

JavaScript is an amazing programing language, it has beautiful parts. But it also contains very confusing and complex parts. Closures and scopes are probably two of the them. In his book JavaScript: The Good Parts (a must read for every web developer!) Douglas Crockford regrads the JavaScript Scope as one of the awfull parts. I couldn’t agree more. As a software developer that started his programming with languages such as C/C++, I had hard times getting used to it and prevent bugs and errors in my programs. But where there’s a pitfall, there is also a challenge, and one of the best way to handle this challenge is using Closures. On the contrary to scopes, Closures are one of the best features in JavaScript that adds a lot of depth and opportunities to develop clean and good code. But Closures are not easy to grasp and understand. In this blog post I will explain what is a closure, how and when to use it.

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

An Introduction to RxJS

By Amitai B, Jun 28 2016

RxJS is an open source JavaScript library originally created at Microsoft. RxJS is an implementation of the of the Reactive Extensions (Rx) in javascript. Rx is a reactive programming model that allows developers to easily compose asynchronous streams of data. It provides a common interface to combine and transform data from wildly different sources.

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

Debugging tips

By Guy Y, May 9 2016

Programs are like kids. You're at your home/office playing around, see how your baby grows, does all these nice things you taught it to do, and feel so proud when it succeeds. It reflects you so well, for the better & the worst.

Read More

Better Dependency Management For NPM

By David V, Apr 30 2016

When you are like me working in a team of web engineers, on a project which involves usage of external 3rd party libraries and you are using npm and/or bower to manage those dependencies, you probably will find it useful.

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

Angular2 vs. Angular1

By Eyal H, Apr 14 2016

Angular 2 is built as "lego bricks", where every view and it's model (MVC talking) are a "component" that can define it's own onInit, onChange and onDestroy callbacks, giving it an atomic nature from one hand, and callbacks such as afterContentInit or afterViewInit which gives it a container nature from the other hand. Giving each component it's own life-cycle and giving each component the possibility to contain or be contained, makes it much easier to dynamically build an application, or a "lego castle" if you wish. Opposed to angular 1 where the controller is the major parent and it mainly contains a large html and directives.

Read More

Asyncronous Client-Side Javascript Primer

By Amitai B, Apr 6 2016

Asynchronous development is very important for application performance and responsiveness. An application that is written synchronously will feel stuck every time it needs to perform a long running operation such as network operations, file access, etc.

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

Postgres with JSON, works for me :)

By Amitai B, Mar 20 2016

When designing a web application, one of the first decisions is where and how to store the data. There are many alternatives, and the most popular ones these days are PostgreSQL, MySQL and MongoDB. PostgreSQL and MySQL belong to the SQL camp or storing data in a structured manner that is easily queried while MongoDB belongs to the NoSQL camp that promotes storing data in a semi-structured manner that scales very well but is more difficult to query. In this blog post I will focus on PostgreSQL and on its feature of JSON support that aims to provide some of the benefits of both worlds. This post is not meant to be a SQL vs. NoSQL debate, we have plenty of those :)

Read More

ActiveRecord Overview and Tips

By Guy Y, Mar 15 2016

Object-Relational Mapping or ORM is a technique that connects the rich objects of an application to tables in a relational database management system. Using ORM, the properties and relationships of the objects in an application can be easily stored and retrieved from a database without writing SQL statements directly and with less overall database access code. This post goes over the excellent Ruby ORM called ActiveRecord

Read More

Elixir Self Discovering Cluster

By Guy Y, Mar 10 2016

Distributed systems are by nature deployed on multiple machines. In development mode though we would rather set up such an environment on a single machine for convenience. In this post we demonstrate how to set up a dynamic cluster on a single development machine.

Read More

Why React

By Gil M, Jan 30 2016

React is a new(ish) front-end library from Facebook that aims to provide a simpler UI programming model with some performance gains.

Read More

Angular Directive Guidelines

By Gil M, May 24 2015

The Angular documentation for directives can be a bit intimidating so here are a few simple guidelines to creating a reusable widget in Angular. A widget is a visual element implemented via an Angular directive and tested mostly manually in a browser. If the widget performs some calculations such as date calculations for instance that do require tests, this is best done in an injected lib that is tested separately. Examples of widgets are two-way sliders, multi-select drop-downs, graphs etc., these are visual elements that have the following interface to the outside world:

Read More

Quick AngularJS Optimizations

By Gil M, Jan 22 2015

Here are a few quick tips to optimize AngularJS code for speed:

Read More