<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: pomyo</title>
    <description>The latest articles on DEV Community by pomyo (@pomyo).</description>
    <link>https://dev.to/pomyo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F113603%2Ff2243fe1-9d13-41e0-8e2f-610ea597f1ce.png</url>
      <title>DEV Community: pomyo</title>
      <link>https://dev.to/pomyo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pomyo"/>
    <language>en</language>
    <item>
      <title>Similarities of Sequelize.js and Mongoose.js</title>
      <dc:creator>pomyo</dc:creator>
      <pubDate>Fri, 16 Nov 2018 01:07:21 +0000</pubDate>
      <link>https://dev.to/pomyo/similarities-of-sequelizejs-and-mongoosejs-i8i</link>
      <guid>https://dev.to/pomyo/similarities-of-sequelizejs-and-mongoosejs-i8i</guid>
      <description>

&lt;p&gt;Choosing the right ORM to play nice with your database is important. It can save you tons of effort when trying to persist your data correctly and efficiently. With the emergence of NoSql databases like MongoDB, popular ORMs like Mongoose helps bridge the gap between your frontend and backend data while traditional relational databases like MySql make great use of Sequelize.&lt;/p&gt;

&lt;p&gt;Although MySql and MongoDB are very different databases, the ORMs that support them by creating, finding, updating and deleting data are very similar if not the same.&lt;/p&gt;

&lt;p&gt;Here are some ways they look the very similar.&lt;/p&gt;

&lt;p&gt;For finding or selecting data, Mongoose and Sequelize both use &lt;code&gt;.find()&lt;/code&gt; functions. To return everything in the table Mongoose uses &lt;code&gt;.find({})&lt;/code&gt; while Sequelize uses &lt;code&gt;.findAll({})&lt;/code&gt;. To find by the primary key or the id, Mongoose uses &lt;code&gt;.findById()&lt;/code&gt; and Sequelize uses &lt;code&gt;.findByPk()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For creating documents or rows, Mongoose and Sequelize both uses the same &lt;code&gt;.create()&lt;/code&gt; function to either generate new documents or add new rows to the table. Both have functions to send multiple inserts into their respective databases via &lt;code&gt;.bulkWrite()&lt;/code&gt; for Mongoose and &lt;code&gt;.bulkCreate()&lt;/code&gt; for Sequelize. Mongoose also have addition ways to create collections via &lt;code&gt;.createCollection()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To update data, both ORMs provide a &lt;code&gt;.update()&lt;/code&gt; function with a slight difference where Sequelize declares it's own &lt;code&gt;.upsert()&lt;/code&gt; (insert instead if can't find anything to update) function while in Mongoose, an option can be specified on &lt;code&gt;.update()&lt;/code&gt;. Mongoose in turn also have several variety of update functions like &lt;code&gt;.updateMany()&lt;/code&gt; and &lt;code&gt;.updateOne()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;And finally, to delete things, Sequelize offer the mighty &lt;code&gt;.destroy()&lt;/code&gt; function while Mongoose uses &lt;code&gt;.delete()&lt;/code&gt;(originally also &lt;code&gt;.destroy()&lt;/code&gt;). Mongoose can also &lt;code&gt;.deleteOne()&lt;/code&gt; and &lt;code&gt;.deleteMany()&lt;/code&gt;.&lt;/p&gt;


</description>
      <category>mern</category>
      <category>orm</category>
      <category>sequelizejs</category>
      <category>mongoosejs</category>
    </item>
    <item>
      <title>What's first? Frontend or Backend?</title>
      <dc:creator>pomyo</dc:creator>
      <pubDate>Tue, 13 Nov 2018 02:41:38 +0000</pubDate>
      <link>https://dev.to/pomyo/whats-first-frontend-or-backend-ini</link>
      <guid>https://dev.to/pomyo/whats-first-frontend-or-backend-ini</guid>
      <description>&lt;p&gt;As a fresher straight out of college, I've never really grasp the differentiation between frontend and backend development. I've barely digested the grueling computer science courses of my degree let alone understand the many stacks that make up the entire development process. As such, my first job was synonymous to trial by fire. I had to do everything from setting up a database, figuring out how to run a server, deciding the best design patterns to use and cultivate my inner aesthetic self just enough to make a decent looking page with CSS. &lt;/p&gt;

&lt;p&gt;Fast forward three years. &lt;/p&gt;

&lt;p&gt;Now I have a relatively good grasp of the development world. Although far from being considered a good coder, the technical terms and buzzwords no longer strike me as hieroglyphics from an alien magazine. Researching issues are no longer seems like an olympic chore. But one thing still itches me whenever I start a new project. Frontend or backend first? While this may not be a question for those that have specific roles on the team, knowing which to start first helps me tremendously in organizing my code. From experience, I've noticed the pros and con of doing each first.&lt;/p&gt;

&lt;p&gt;Front end first&lt;br&gt;
Pros -  Better organization of your design vision.&lt;br&gt;
        Use front end elements to gradually map out backend functionality.&lt;br&gt;
        Faster gratification from not having to redeploy.&lt;br&gt;
        Have something to show at the end of the day.&lt;br&gt;
        It's more fun.&lt;/p&gt;

&lt;p&gt;Cons -  Clients think you're done.&lt;br&gt;
        Nothing works (yet).&lt;/p&gt;

&lt;p&gt;Back end first&lt;br&gt;
Pros -  Tedious part is done.&lt;br&gt;
        Requirements are quickly fulfilled.&lt;/p&gt;

&lt;p&gt;Cons -  Have very little to show to client besides code.&lt;br&gt;
        May not get a lot of feedback so may incur more refactoring later.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>backend</category>
      <category>ux</category>
      <category>organizing</category>
    </item>
  </channel>
</rss>
