Skip to main content

Posts

Need To Know About SQL's GROUP BY

A Brief Tutorial  Group by  is one of the most frequently used SQL clauses. It allows you to collapse a field into its distinct values. This clause is most often used with aggregations to show one value per grouped field or combination of fields. Consider the following table We can use a group by and aggregates to collect multiple types of information. For example, a group by can quickly tell us the number of countries on each continent.   How many countries are in each continent? select    continent   ,  count (*) from     countries group by     continent ‍ Keep in mind when using GROUP BY: Group by X means put all those with the same value for X in the same row. Group by X, Y put all those with the same values for both X and Y in the same row. ‍ ‍ More Interesting Things About GROUP BY 1. Aggregations Can Be Filtered Using The HAVING Clause ‍ You will quickly discover that the where clause cannot be used on an aggregation. For instance select    continent
Recent posts

REST Architecture and REST Constraints

What is REST? This term “REST” was first defined by Roy Fielding in 2000. It stands for  Representational State Transfer(REST) . Actually REST is architectural model and design for serve network applications.The most common application of REST is the World Wide Web itself, which used REST as a basis for HTTP 1.1 development. What is the REST API? A RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. Representational state transfer (REST), which is used by browsers, can be thought of as the language of the Internet. REST architectural Model REST- RE presentational  S tate  T ransfer Resource-based Representation Six Constraints Client-Server Stateless Cacheable Uniform Interface Layered System Code-On-Demand The REST architectural style describes six constraints. These constraints, applied to the architecture, were originally communicated by Roy Fielding in his doctoral dissertation and defines the

Android Architecture Patterns Part 1: Model-View-Controller

A year ago, when the majority of the current Android team started working at upday, the application was far from being the robust, stable app that we wanted it to be. We tried to understand why our code was in such bad shape and we found two main culprits: continuous changing of the UI and the lack of an architecture that supported the flexibility that we needed. The app was already at its fourth redesign in six months. The design pattern chosen seemed to be Model-View-Controller but was then already a “mutant”, far from how it should be. Let’s discover together what the Model-View-Controller pattern is; how it has been applied in Android over the years; how it should be applied so it can maximize testability; and some of its advantages and disadvantages. The Model-View-Controller Pattern In a world where the user interface logic tends to change more often than the business logic, the desktop and Web developers needed a way of separating user interface functionality. The MV