Creating Views in Ruby on Rails

Last week we looked at creating Controllers in Ruby on Rails (Creating Controllers in Ruby on Rails. The Controller is responsible for accepting requests and returning responses. The final component of the MVC paradigm is the View. The View layer is responsible for generating the HTML response for the request. In today’s tutorial we will […]

Continue reading...

How to test uploading and returning files in Laravel

Last week we looked at creating temporary urls to allow API clients to get uploaded files without exposing those files to the public internet (Returning secure files from an API with temporary URLs). Uploading and returning files is a very common requirement of web applications and so it’s probably very likely that you will need […]

Continue reading...

Creating Controllers in Ruby on Rails

Last week we looked at defining routes in Ruby on Rails. When a request enters your application, the router will parse the URL path and dispatch the request to the relevant Controller. The Controller forms an important part of the MVC (Model-View-Controller) design pattern and so Controllers are an integral part of a Ruby on […]

Continue reading...

Returning secure files from an API with temporary URLs

A common requirement for many types of web application is the ability for users to upload files. For example, a project management application might allow the user to upload documents, images, or videos that should be stored with the project. Once the files are uploaded, you need to provide a way for the client to […]

Continue reading...

Defining URL routes in Ruby on Rails

The main entry point to most Web Applications is via HTTP requests through a URL scheme. A good URL scheme is very important to a web application. URLs should describe the resource, show hierarchy and provide a predictable path through the application for the user. Rails makes it easy to define your routes to follow […]

Continue reading...

Dealing with scheduling in PHP

A common requirement for web applications is the ability to schedule something for the future. By this I mean, calculate when the next time something should happen. For example, if you want a round up email to be delivered on a particular day of the week, or if you need to notify your users about […]

Continue reading...

Querying with Active Record in Ruby on Rails

The Active Record pattern encapsulates a single row of the database in an object. This makes it really easy to create, update, and delete data from the database. We can also use the Active Record class to query data from the database. The ability to query, create, update, and delete from a single object is […]

Continue reading...

Sending data via Pusher in a Laravel Application

Over the last couple of weeks we’ve been adding Pusher to a Laravel application. First, we set up the Client for making requests to Pusher and the Storage to store the currently active users in Setting up Pusher in a Laravel Application. Last week we looked at authenticating users using both private and presence channels […]

Continue reading...

Understanding Active Record Callbacks

As we’ve seen over the last couple of weeks, Active Record objects have a lot of power and responsibility within a Ruby on Rails project. You will often find that a lot of the business logic of the application is attracted to your Active Record objects. A common aspect of business logic is that something […]

Continue reading...

Authenticating with Pusher in a Laravel application

Last week we looked at setting up Pusher in a Laravel application. This involved creating a Client to make HTTP requests to Pusher, and a Storage containaer to store the currently active users. In today’s tutorial we’re going to be dealing with the authentication aspect of setting up Pusher. How does Pusher’s authentication work? In […]

Continue reading...