Symfony vs Express: A Server-Side Framework Comparison

Detta är en Kandidat-uppsats från Blekinge Tekniska Högskola/Institutionen för programvaruteknik

Sammanfattning: Context Considering the rising popularity of Node.js and the fact that a very largepercentage of websites today are based on PHP, there is a need to understand thesimilarities and differences between these languages.  Comparing their most popularserver-side  frameworks  is  valuable  to  developers  in  seeing  the  advantages  of  usingone over the other - for both user and developer. Objectives In this study we investigate how Express.js and Symfony compareagainst each other in terms of installation, functionality and performance. Thiswill provide understanding of when to use JavaScript frameworks and when to usePHP frameworks for server-side projects. Method A literature study was done to answer what similarities and differences existbetween the frameworks. To explore how they compare in performance when mul-tiple users are actively sending requests to the server, an experiment was performed.Another experiment was carried out to measure performance in CPU-intensive ap-plications. Results The result shows that both frameworks are quick to install and it is a fastprocess to setup a basic application. Both frameworks are highly cuztomizable andconfigurable because they are supported by a big open source community and theonly difference is that Express is supportive of single-page applications which Sym-fony can not do on its own. Express was better than Symfony to handle multipleconcurrent users when it comes to CPU usage and time it takes for the requests. For100 and 1000 requests, Express CPU usage varied more than Symfony, but at 10000and 100000 it varied less. In all tests with concurrent users, Express was faster. Testsperformed in the second experiment showed that Symfony is only able to use 1 corewhen making the requests while Express is able to use multiple cores. Even thoughSymfony was limited by 1 core it was faster, most likely because it used more memory. Conclusions This study shows that there are more similarities than differencesbetween Express and Symfony. They both strive for high customization and highflexibility with a goal to make tedious tasks easier for the developer. Both rely onopen source modules and components to add additional functionality. Out of thebox, Express comes with less functionality as it strives to be minimalistic. However,to install Symfony is slightly quicker than Express and requires no code. Thereare currently more daily downloads of Express than Symfony, and therefore it’sconsidered more popular. It’s supportive of JavaScript-only for front- and back-endand is able to handle more concurrent users than Symfony, and is therefore betterfor high-traffic websites. But Symfony is able to handle CPU-intensive applicationsbetter than Express, and is able to load in large data sets faster, making it a goodchoice for applications with a lot of data and high CPU usage.

  HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)