<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chief of Stack</title>
	<atom:link href="https://www.chiefofstack.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.chiefofstack.com/</link>
	<description>Full Stack Creative Works by Jay Acab</description>
	<lastBuildDate>Tue, 10 Mar 2026 21:21:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.0.2</generator>

<image>
	<url>https://www.chiefofstack.com/wp-content/uploads/2020/05/cropped-logo-32x32.jpg</url>
	<title>Chief of Stack</title>
	<link>https://www.chiefofstack.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>2022, the year we connected some dots</title>
		<link>https://www.chiefofstack.com/2023/01/24/2022-the-year-we-connected-some-dots/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=2022-the-year-we-connected-some-dots</link>
					<comments>https://www.chiefofstack.com/2023/01/24/2022-the-year-we-connected-some-dots/#comments</comments>
		
		<dc:creator><![CDATA[Jay Acab]]></dc:creator>
		<pubDate>Tue, 24 Jan 2023 19:25:02 +0000</pubDate>
				<category><![CDATA[Life]]></category>
		<guid isPermaLink="false">https://www.chiefofstack.com/?p=2922</guid>

					<description><![CDATA[<p>Today marks the first year since we packed our bags and left for greener pastures. I can still remember in the few months leading to our flight we sold our house, our car, and everything... </p>
<p class="more"><a class="more-link" href="https://www.chiefofstack.com/2023/01/24/2022-the-year-we-connected-some-dots/">Read More</a></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2023/01/24/2022-the-year-we-connected-some-dots/">2022, the year we connected some dots</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Today marks the first year since we packed our bags and left for greener pastures. I can still remember in the few months leading to our flight we sold our house, our car, and everything that we own. I remember saying, if we’re going to do this we have to go all in, no looking back.&nbsp;</p>



<div class="wp-container-8 wp-block-group"><div class="wp-block-group__inner-container">
<div class="wp-container-7 wp-block-columns">
<div class="wp-container-6 wp-block-column" style="flex-basis:100%">
<div class="wp-container-5 wp-block-group"><div class="wp-block-group__inner-container">
<div class="wp-container-4 wp-block-columns">
<div class="wp-container-3 wp-block-column" style="flex-basis:100%">
<figure class="wp-container-2 wp-block-gallery-1 wp-block-gallery has-nested-images columns-default is-cropped">
<figure class="wp-block-image size-large"><img width="1920" height="2560" src="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8238-scaled.jpg" alt="" class="wp-image-2924" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8238-scaled.jpg 1920w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8238-225x300.jpg 225w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8238-768x1024.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8238-1152x1536.jpg 1152w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8238-1536x2048.jpg 1536w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8238-1060x1413.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8238-550x733.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8238-375x500.jpg 375w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8238-810x1080.jpg 810w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="1920" height="2560" src="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8766-scaled.jpg" alt="" class="wp-image-2936" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8766-scaled.jpg 1920w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8766-225x300.jpg 225w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8766-768x1024.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8766-1152x1536.jpg 1152w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8766-1536x2048.jpg 1536w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8766-1060x1413.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8766-550x733.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8766-375x500.jpg 375w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8766-810x1080.jpg 810w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="802" height="1024" src="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8785-802x1024.jpg" alt="" class="wp-image-2938" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8785-802x1024.jpg 802w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8785-235x300.jpg 235w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8785-768x981.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8785-1203x1536.jpg 1203w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8785-1604x2048.jpg 1604w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8785-1060x1354.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8785-550x702.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8785-392x500.jpg 392w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8785-1920x2452.jpg 1920w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8785-846x1080.jpg 846w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8785-scaled.jpg 2005w" sizes="(max-width: 802px) 100vw, 802px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="1920" height="2560" src="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8921-scaled.jpg" alt="" class="wp-image-2923" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8921-scaled.jpg 1920w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8921-225x300.jpg 225w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8921-768x1024.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8921-1152x1536.jpg 1152w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8921-1536x2048.jpg 1536w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8921-1060x1413.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8921-550x733.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8921-375x500.jpg 375w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8921-810x1080.jpg 810w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="768" height="1024" src="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8940-768x1024.jpg" alt="" class="wp-image-2939" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8940-768x1024.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8940-225x300.jpg 225w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8940-1152x1536.jpg 1152w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8940-1536x2048.jpg 1536w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8940-1060x1413.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8940-550x733.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8940-375x500.jpg 375w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8940-scaled.jpg 1920w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_8940-810x1080.jpg 810w" sizes="(max-width: 768px) 100vw, 768px" /></figure>
</figure>
</div>
</div>
</div></div>
</div>
</div>
</div></div>



<p>We were so busy preparing that I had to put off writing on this blog, hoping that once we get settled in I can go back to this. But nothing could have prepared us for what will happen next.</p>



<p>Without going into details, we had 2 house transfers, my wife took a bunch of exams, I did some interviews, lots of travels, 2 championships, sports fests, social events, and more social events. We were never really ready for all that but hey, we just soaked it all in and managed!</p>



<div class="wp-container-15 wp-block-columns">
<div class="wp-container-14 wp-block-column" style="flex-basis:100%">
<div class="wp-container-13 wp-block-columns">
<div class="wp-container-12 wp-block-column" style="flex-basis:100%">
<div class="wp-container-11 wp-block-group"><div class="wp-block-group__inner-container">
<figure class="wp-container-10 wp-block-gallery-9 wp-block-gallery has-nested-images columns-default is-cropped">
<figure class="wp-block-image size-large"><img loading="lazy" width="768" height="1024" src="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9051-768x1024.jpg" alt="" class="wp-image-2941" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9051-768x1024.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9051-225x300.jpg 225w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9051-1152x1536.jpg 1152w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9051-1536x2048.jpg 1536w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9051-1060x1413.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9051-550x733.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9051-375x500.jpg 375w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9051-scaled.jpg 1920w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9051-810x1080.jpg 810w" sizes="(max-width: 768px) 100vw, 768px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="768" height="1024" src="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG-0362-768x1024.jpg" alt="" class="wp-image-2953" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG-0362-768x1024.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG-0362-225x300.jpg 225w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG-0362-1152x1536.jpg 1152w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG-0362-1536x2048.jpg 1536w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG-0362-1060x1413.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG-0362-550x733.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG-0362-375x500.jpg 375w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG-0362-scaled.jpg 1920w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG-0362-810x1080.jpg 810w" sizes="(max-width: 768px) 100vw, 768px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="768" height="1024" src="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_6939-768x1024.jpg" alt="" class="wp-image-2940" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_6939-768x1024.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_6939-225x300.jpg 225w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_6939-1152x1536.jpg 1152w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_6939-1536x2048.jpg 1536w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_6939-1060x1413.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_6939-550x733.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_6939-375x500.jpg 375w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_6939-scaled.jpg 1920w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_6939-810x1080.jpg 810w" sizes="(max-width: 768px) 100vw, 768px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="3024" height="4032" src="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_5531.png" alt="" class="wp-image-2930" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_5531.png 3024w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_5531-225x300.png 225w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_5531-768x1024.png 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_5531-1152x1536.png 1152w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_5531-1536x2048.png 1536w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_5531-1060x1413.png 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_5531-550x733.png 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_5531-375x500.png 375w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_5531-1920x2560.png 1920w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_5531-810x1080.png 810w" sizes="(max-width: 3024px) 100vw, 3024px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="3024" height="4032" src="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9225.png" alt="" class="wp-image-2931" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9225.png 3024w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9225-225x300.png 225w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9225-768x1024.png 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9225-1152x1536.png 1152w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9225-1536x2048.png 1536w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9225-1060x1413.png 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9225-550x733.png 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9225-375x500.png 375w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9225-1920x2560.png 1920w, https://www.chiefofstack.com/wp-content/uploads/2023/01/IMG_9225-810x1080.png 810w" sizes="(max-width: 3024px) 100vw, 3024px" /></figure>
</figure>
</div></div>
</div>
</div>
</div>
</div>



<p>My wife passed all her exams and has been a certified UK RN for almost a year now. While I on the other hand continued working part-time for a company in New Zealand.  I also got lucky and passed all interviews/exams for a full-time scholarship from UK’s Department for Education. My course is about to end in a month’s time and along with it a possible job alignment right away.</p>



<figure class="wp-container-17 wp-block-gallery-16 wp-block-gallery has-nested-images columns-default is-cropped">
<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="848" data-id="2943"  src="https://www.chiefofstack.com/wp-content/uploads/2023/01/scos-ui-1024x848.png" alt="" class="wp-image-2943" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/scos-ui-1024x848.png 1024w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scos-ui-300x249.png 300w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scos-ui-768x636.png 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scos-ui-1060x878.png 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scos-ui-550x456.png 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scos-ui-604x500.png 604w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scos-ui.png 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="780" height="520" data-id="2942"  src="https://www.chiefofstack.com/wp-content/uploads/2023/01/ba0232d128e5b3b4c65b2543990064646dd2a296.jpeg" alt="" class="wp-image-2942" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/ba0232d128e5b3b4c65b2543990064646dd2a296.jpeg 780w, https://www.chiefofstack.com/wp-content/uploads/2023/01/ba0232d128e5b3b4c65b2543990064646dd2a296-300x200.jpeg 300w, https://www.chiefofstack.com/wp-content/uploads/2023/01/ba0232d128e5b3b4c65b2543990064646dd2a296-768x512.jpeg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/ba0232d128e5b3b4c65b2543990064646dd2a296-550x367.jpeg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/ba0232d128e5b3b4c65b2543990064646dd2a296-750x500.jpeg 750w" sizes="(max-width: 780px) 100vw, 780px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="472" data-id="2950"  src="https://www.chiefofstack.com/wp-content/uploads/2023/01/scion-general-assembly-1024x472.jpg" alt="" class="wp-image-2950" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/scion-general-assembly-1024x472.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scion-general-assembly-300x138.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scion-general-assembly-768x354.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scion-general-assembly-1536x708.jpg 1536w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scion-general-assembly-1060x488.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scion-general-assembly-550x253.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scion-general-assembly-1086x500.jpg 1086w, https://www.chiefofstack.com/wp-content/uploads/2023/01/scion-general-assembly.jpg 1917w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
</figure>



<p>While all that is happening, I received the best news I have ever received in my life. We now have a baby on the way!</p>



<figure class="wp-container-19 wp-block-gallery-18 wp-block-gallery has-nested-images columns-default is-cropped">
<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="767" data-id="2945"  src="https://www.chiefofstack.com/wp-content/uploads/2023/01/327364450_489319696728943_1783603337738140110_n-1024x767.jpg" alt="" class="wp-image-2945" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/327364450_489319696728943_1783603337738140110_n-1024x767.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327364450_489319696728943_1783603337738140110_n-300x225.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327364450_489319696728943_1783603337738140110_n-768x575.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327364450_489319696728943_1783603337738140110_n-1060x794.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327364450_489319696728943_1783603337738140110_n-550x412.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327364450_489319696728943_1783603337738140110_n-668x500.jpg 668w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327364450_489319696728943_1783603337738140110_n.jpg 1170w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="768" height="1024" data-id="2946"  src="https://www.chiefofstack.com/wp-content/uploads/2023/01/327101049_5900536373361584_5947366217441938010_n-768x1024.jpg" alt="" class="wp-image-2946" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/327101049_5900536373361584_5947366217441938010_n-768x1024.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327101049_5900536373361584_5947366217441938010_n-225x300.jpg 225w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327101049_5900536373361584_5947366217441938010_n-1152x1536.jpg 1152w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327101049_5900536373361584_5947366217441938010_n-1060x1413.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327101049_5900536373361584_5947366217441938010_n-550x733.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327101049_5900536373361584_5947366217441938010_n-375x500.jpg 375w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327101049_5900536373361584_5947366217441938010_n-810x1080.jpg 810w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327101049_5900536373361584_5947366217441938010_n.jpg 1170w" sizes="(max-width: 768px) 100vw, 768px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="767" data-id="2944"  src="https://www.chiefofstack.com/wp-content/uploads/2023/01/327327078_487727130106686_1208613862994960624_n-1024x767.jpg" alt="" class="wp-image-2944" srcset="https://www.chiefofstack.com/wp-content/uploads/2023/01/327327078_487727130106686_1208613862994960624_n-1024x767.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327327078_487727130106686_1208613862994960624_n-300x225.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327327078_487727130106686_1208613862994960624_n-768x575.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327327078_487727130106686_1208613862994960624_n-1060x794.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327327078_487727130106686_1208613862994960624_n-550x412.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327327078_487727130106686_1208613862994960624_n-668x500.jpg 668w, https://www.chiefofstack.com/wp-content/uploads/2023/01/327327078_487727130106686_1208613862994960624_n.jpg 1170w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
</figure>



<p>Who knew all of these were possible in such a short time? Everything happened so fast but none of that would have happened if we didn’t have the courage to leave our somewhat comfy life at home.&nbsp;&nbsp;Looking back we wouldn’t have done it any other way. As Steve Jobs once said, “You can only connect the dots looking back. So you have to trust that the dots will somehow connect in your future”.&nbsp;</p>



<p>This is only our first step and it certainly won’t be our last. Looking to connect more dots next year especially now that we planted our feet firmly here in the UK.</p>



<p>A water bottle at the store cost $1.<br>The same bottle at a hotel is $3.<br>At an airport $5.</p>



<p>Same bottle, same brand. The only thing that changed is the place.</p>



<p>If ever you feel unappreciated, worthless, or undervalued remember that each place gives a different value to the same things.</p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2023/01/24/2022-the-year-we-connected-some-dots/">2022, the year we connected some dots</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chiefofstack.com/2023/01/24/2022-the-year-we-connected-some-dots/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Easily create a local Laravel development environment with Docker in Windows</title>
		<link>https://www.chiefofstack.com/2021/06/11/easily-create-a-local-laravel-development-environment-with-docker-in-windows/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=easily-create-a-local-laravel-development-environment-with-docker-in-windows</link>
					<comments>https://www.chiefofstack.com/2021/06/11/easily-create-a-local-laravel-development-environment-with-docker-in-windows/#respond</comments>
		
		<dc:creator><![CDATA[Jay Acab]]></dc:creator>
		<pubDate>Fri, 11 Jun 2021 22:00:42 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://www.chiefofstack.com/?p=2824</guid>

					<description><![CDATA[<p>This article is meant to be a short walkthrough on how to quickly setup a local development environment using Docker, a better alternative to installing a full LAMP stack such as XAMPP on your machine.... </p>
<p class="more"><a class="more-link" href="https://www.chiefofstack.com/2021/06/11/easily-create-a-local-laravel-development-environment-with-docker-in-windows/">Read More</a></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2021/06/11/easily-create-a-local-laravel-development-environment-with-docker-in-windows/">Easily create a local Laravel development environment with Docker in Windows</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This article is meant to be a short walkthrough on how to quickly setup a local development environment using Docker, a better alternative to installing a full LAMP stack such as XAMPP on your machine. This is not a full tutorial on Docker though, I just find this method works the best for me when developing Laravel apps.</p>



<p>Here&#8217;s the GitHub repo for all the code below, you can clone it for easier deployment. <a href="https://github.com/chiefofstack/docker-boilerplate">https://github.com/chiefofstack/docker-boilerplate</a></p>



<h3>What is Docker and what are we going to create anyway?</h3>



<p><em>&#8220;Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.&#8221;</em><br>&#8211; opensource.com</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="818" src="https://www.chiefofstack.com/wp-content/uploads/2021/06/what-is-docker.jpg" alt="What is Docker" class="wp-image-2878" srcset="https://www.chiefofstack.com/wp-content/uploads/2021/06/what-is-docker.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2021/06/what-is-docker-300x240.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2021/06/what-is-docker-768x614.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2021/06/what-is-docker-550x439.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2021/06/what-is-docker-626x500.jpg 626w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Apps and services like PHP can be packaged and deployed easily.<br>Photo from: <a rel="noreferrer noopener" href="https://www.docker.com/resources/what-container" target="_blank">docker.com</a></figcaption></figure>



<p>In a nutshell, we can think of Docker as a lightweight virtual machine that can be easily deployed across any environment together with all the configurations. This guarantees that your application will run precisely how it&#8217;s intended whether it is in production, staging or in a development environment.</p>



<p>That&#8217;s it, we will create service containers for our entire stack. Let&#8217;s get started!</p>



<h3>Step 1. Install Docker Desktop</h3>



<p>If you are a Windows user, download and install Docker for Windows using this <a href="https://docs.docker.com/docker-for-windows/install/" target="_blank" rel="noreferrer noopener">link</a>. Docker Desktop has a built in tool called <strong>docker-compose</strong> which we will utilize to link our services/containers together.</p>



<p><em>&#8220;Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration.&#8221; </em><em><br></em>&#8211; docker.com</p>



<p>Note that you need WSL 2 configured on your Windows machine before you can install this app.</p>



<h3>Step 2:&nbsp; Create individual containers for each of our services</h3>



<p>Cd into your project directory and run the following commands in your terminal (for this example I used /home/myuser/Sites/awesomeproject.com). these are basically all the files/folders that we need:</p>



<pre class="wp-block-code">$ touch docker-compose.yml
$ touch Dockerfile
$ mkdir src
$ mkdir mysql
$ mkdir nginx
$ touch nginx/default.conf</pre>



<p>Your file structure should look like this.</p>



<figure class="wp-container-21 wp-block-gallery-20 wp-block-gallery has-nested-images columns-default is-cropped">
<figure class="wp-block-image size-large"><img data-id="2842"  src="https://www.chiefofstack.com/public_html/wp-content/uploads/2021/06/step-2-file-our-structure.jpg" alt="" class="wp-image-2842"/></figure>
</figure>



<p>Edit docker-compose.yml and define our networks</p>



<pre class="wp-block-code">version: '3'
networks:
    laravel: </pre>



<p>Next we define the services we will use for our stack. For NGINX add the following code, this will make the server accessible through port 1010. We also mapped the configuration file to default.conf file found in our nginx folder.:</p>



<pre class="wp-block-code">services:
    nginx:
        image: nginx:stable-alpine
        container_name: nginx_awesomeproject.com
        ports:
            - "1010:80"
        volumes:
            - ./src:/var/www/html
            - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
        depends_on:
            - php
            - mysql
            - phpmyadmin
        networks:
            - laravel</pre>



<p>Then edit nginx/default.conf and add the following code:</p>



<pre class="wp-block-code">server {
    listen 80;
    index index.php index.html;
    server_name localhost;
    error_log /var/log/nginx/error.log;
    access_log /var/log/nginx/access.log;
    root /var/www/html/public;
    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }
    location ~ \.php$ {
        try_files $uri = 404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass php:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
    }
}</pre>



<p>For PHP edit docker-composer.yml again and add the following code. Like the NGINX service above, we prepend the service name php_ for our container_name, used a unique port 1000 so it doesn’t interfere with other local ports in our system and linked it to our container using the ‘laravel’ network. We also added a custom docker file ‘Dockerfile’:</p>



<pre class="wp-block-code">   php:
        build:
            context: .
            dockerfile: Dockerfile
        container_name: php_awesomeproject.com
        volumes:
            - ./src:/var/www/html
        ports:
            - "1000:9000"
        networks:
            - laravel</pre>



<p>Edit Dockerfile and add the following code, this will install php: 7.4-fpm-alpine and also install php extensions.</p>



<pre class="wp-block-code">FROM php:7.4-fpm-alpine
RUN docker-php-ext-install pdo pdo_mysql</pre>



<p>For MySQL add the following to docker-composer.yml.  Here we defined the MySQL credentials that we will use in our Laravel installation. And just like with the previous two service, we linked them up using the “laravel” network</p>



<pre class="wp-block-code">    mysql:
        image: mysql:5.7.22
        container_name: mysql_awesomeproject.com
        restart: unless-stopped
        tty: true
        ports: 
            - "1306:3306"
        volumes:
            - ./mysql_awesomeproject.com:/var/lib/mysql
        environment:
            MYSQL_DATABASE: homestead
            MYSQL_USER: homestead
            MYSQL_PASSWORD: secret
            MYSQL_ROOT_PASSWORD: secret
            SERVICE_TAGS: dev
            SERVICE_NAME: mysql
        networks:
            - laravel</pre>



<p>There you go, if all you want is a basic LEMP stack you can skip to the next step. But in order to make our dev environment even more complete I recommend you go ahead and install the following tools.</p>



<p>We will configure Artisan, the command-line interface included with Laravel. It provides a number of helpful commands for your use while developing your application.:</p>



<pre class="wp-block-code">    artisan:
        build:
            context: .
            dockerfile: Dockerfile
        container_name: artisan_awesomeproject.com
        volumes:
            - ./src:/var/www/html
        depends_on:
            - mysql
        working_dir: /var/www/html
        entrypoint: &#91;'/var/www/html/artisan']
        networks:
            - laravel</pre>



<p></p>



<p>We will add Composer, a dependency manager for PHP:</p>



<pre class="wp-block-code">    composer:
        image: composer:latest
        container_name: composer_awesomeproject.com
        volumes:
            - ./src:/var/www/html
        working_dir: /var/www/html
        depends_on:
            - php
        networks:
            - laravel</pre>



<p>Next we add Node Package Manager. NPM is a package manager for JavaScript.</p>



<pre class="wp-block-code">    npm:
        image: node:13.7
        container_name: npm_awesomeproject.com
        volumes:
            - ./src:/var/www/html
        working_dir: /var/www/html
        entrypoint: &#91;'npm']
        networks:
            - laravel</pre>



<p>I also love to use PHPMyAdmin, a free and open source administration tool for MySQL and MariaDB.</p>



<pre class="wp-block-code">    phpmyadmin:
        image: phpmyadmin/phpmyadmin
        container_name: phpmyadmin_awesomeproject.com
        restart: always
        depends_on:
            - mysql
        ports:
            - 1011:80
        environment:
            PMA_HOST: mysql
            PMA_USER: root
            PMA_PASSWORD: secret            
            PMA_ARBITRARY: 1
        networks:
            - laravel</pre>



<p>Your docker-compose.yml file should look like this.&nbsp;</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="796" src="https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose.yml_-1024x796.jpg" alt="docker-compose.yml" class="wp-image-2863" srcset="https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose.yml_-1024x796.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose.yml_-300x233.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose.yml_-768x597.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose.yml_-1536x1194.jpg 1536w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose.yml_-1060x824.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose.yml_-550x427.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose.yml_-643x500.jpg 643w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose.yml_-1390x1080.jpg 1390w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose.yml_.jpg 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>With this file we were able to link our containers using the network &#8220;laravel&#8221;, added volumes to each of our containers and defined the images to be used when we run it later. Those images are available from the Docker library. We were also able to install tools necessary for a better Laravel development experience.</p>



<h3>Step 3: Run the containers and access it locally&nbsp;</h3>



<p>In your terminal run the following in your project folder, this will build and run the containers all in one go. Note that Artisan will fail to run but we will solve that on the next step:</p>



<pre class="wp-block-code">~ docker-compose up -d --build</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="806" height="453" src="https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose-up-d-build.jpg" alt="" class="wp-image-2870" srcset="https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose-up-d-build.jpg 806w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose-up-d-build-300x169.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose-up-d-build-768x432.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-compose-up-d-build-550x309.jpg 550w" sizes="(max-width: 806px) 100vw, 806px" /></figure>



<p>To test, run this command to list all running containers:</p>



<pre class="wp-block-code">~ docker ps/</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="103" src="https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-ps-1024x103.jpg" alt="" class="wp-image-2871" srcset="https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-ps-1024x103.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-ps-300x30.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-ps-768x77.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-ps-1060x107.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-ps-550x55.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2021/06/docker-ps.jpg 1164w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>You can then check http://localhost:1010 to see if the NGINX server is properly running, right now we don’t have a placeholder index.html there so it will naturally return a 404 error</p>



<figure class="wp-block-image size-large"><img src="https://www.chiefofstack.com/public_html/wp-content/uploads/2021/06/nginx-localhost-1010.jpg" alt="" class="wp-image-2840"/></figure>



<p>To be able to see the database go to http://localhost:1011, where you will see PHPMyAdmin</p>



<figure class="wp-block-image size-large"><img src="https://www.chiefofstack.com/public_html/wp-content/uploads/2021/06/phpmyadmin-localhost-1010.jpg" alt="" class="wp-image-2841"/></figure>



<p>You can connect to mysql through the terminal as well with this code:</p>



<pre class="wp-block-code">~ docker-compose exec mysql mysql -u root -p</pre>



<figure class="wp-block-image size-large"><img src="https://www.chiefofstack.com/public_html/wp-content/uploads/2021/06/docker-compose-exec-mysql.jpg" alt="" class="wp-image-2832"/></figure>



<p>Lastly, you can take the containers down using the following commands:</p>



<pre class="wp-block-code">~ docker-compose down</pre>



<figure class="wp-block-image size-large"><img src="https://www.chiefofstack.com/public_html/wp-content/uploads/2021/06/docker-compose-down.jpg" alt="" class="wp-image-2831"/></figure>



<h3>Final Step: Install Laravel and test the tools</h3>



<p>If you’ve gone this far you would’ve encountered an error when we ran the artisan container earlier. It’s because we do not have Laravel installed in the /src folder yet. We will do that now,&nbsp; cd into your /src folder and run the following composer command:</p>



<pre class="wp-block-code">~ composer create-project laravel/laravel .</pre>



<figure class="wp-block-image size-large"><img src="https://www.chiefofstack.com/public_html/wp-content/uploads/2021/06/docker-compose-create-project-laravel.jpg" alt="" class="wp-image-2830"/></figure>



<p>Configure the .env file to match the MySQL credentials we defined earlier in docker-compose.yml. Your .env file should look like this.<br></p>



<figure class="wp-block-image size-large"><img src="https://www.chiefofstack.com/public_html/wp-content/uploads/2021/06/laravel-env-file.jpg" alt="" class="wp-image-2838"/></figure>



<p>To install a Laravel package using Composer run the following command (we’ll install Socialite for this example):</p>



<pre class="wp-block-code">~ docker-compose run --rm composer require laravel/socialite</pre>



<figure class="wp-block-image size-large"><img src="https://www.chiefofstack.com/public_html/wp-content/uploads/2021/06/docker-compose-composer-require-laravel-socialite.jpg" alt="" class="wp-image-2829"/></figure>



<p>Let’s now test how to compile assets:</p>



<pre class="wp-block-code">~ docker-compose run -rm npm run dev</pre>



<figure class="wp-block-image size-large"><img src="https://www.chiefofstack.com/public_html/wp-content/uploads/2021/06/docker-compose-run-npm-run-dev.jpg" alt="" class="wp-image-2834"/></figure>



<p>Let’s test Artisan by issuing a migrate command:</p>



<pre class="wp-block-code">~ docker-compose run -rm artisan migrate</pre>



<figure class="wp-block-image size-large"><img src="https://www.chiefofstack.com/public_html/wp-content/uploads/2021/06/docker-compose-run-artisan-migrate.jpg" alt="" class="wp-image-2833"/></figure>



<p>Go back to your browser to test the Laravel installation:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="679" src="https://www.chiefofstack.com/wp-content/uploads/2021/06/laravel-installation-complete-1024x679.jpg" alt="" class="wp-image-2874" srcset="https://www.chiefofstack.com/wp-content/uploads/2021/06/laravel-installation-complete-1024x679.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2021/06/laravel-installation-complete-300x199.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2021/06/laravel-installation-complete-768x509.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2021/06/laravel-installation-complete-1060x703.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2021/06/laravel-installation-complete-550x365.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2021/06/laravel-installation-complete-754x500.jpg 754w, https://www.chiefofstack.com/wp-content/uploads/2021/06/laravel-installation-complete.jpg 1235w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3>Bonus Step:</h3>



<p>I edited my Linux .bashrc file and added &#8220;dcr&#8221; as an alias for &#8220;docker-compose run -rm&#8221; command.</p>



<figure class="wp-block-image size-large"><img src="https://www.chiefofstack.com/public_html/wp-content/uploads/2021/06/edit-bashrc-file-add-docker-compose-alias.jpg" alt="" class="wp-image-2837"/></figure>



<p>This will make it easier to run the tools using the following shorthand &#8220;dcr npm run dev&#8221;, &#8220;dcr artisan migrate&#8221;, “dcr composer install”.&nbsp;</p>



<p>SOURCES:<br><a href="https://opensource.com/resources/what-docker" target="_blank" rel="noreferrer noopener">https://opensource.com/resources/what-docker</a><br><a href="https://docs.docker.com/compose/" target="_blank" rel="noreferrer noopener">https://docs.docker.com/compose/</a></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2021/06/11/easily-create-a-local-laravel-development-environment-with-docker-in-windows/">Easily create a local Laravel development environment with Docker in Windows</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chiefofstack.com/2021/06/11/easily-create-a-local-laravel-development-environment-with-docker-in-windows/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Basic AJAX CRUD app using PHP, MySQL and jQuery</title>
		<link>https://www.chiefofstack.com/2021/01/23/basic-ajax-crud-app-using-php-mysql-and-jquery/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=basic-ajax-crud-app-using-php-mysql-and-jquery</link>
					<comments>https://www.chiefofstack.com/2021/01/23/basic-ajax-crud-app-using-php-mysql-and-jquery/#comments</comments>
		
		<dc:creator><![CDATA[Jay Acab]]></dc:creator>
		<pubDate>Sat, 23 Jan 2021 23:33:27 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://www.chiefofstack.com/?p=2797</guid>

					<description><![CDATA[<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2021/01/23/basic-ajax-crud-app-using-php-mysql-and-jquery/">Basic AJAX CRUD app using PHP, MySQL and jQuery</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="vc_row wpb_row vc_row-fluid"><div class="wpb_column vc_column_container vc_col-sm-12"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div class="wpb_text_column wpb_content_element " >
		<div class="wpb_wrapper">
			<p>We are going to build a basic AJAX CRUD app from scratch using only PHP, MySQL and jQuery AJAX. CRUD is an acronym for Create, Read, Update, Delete. Basic operations that are at the heart of all web apps.</p>
<p>We will use Bootstrap for the layout and utilize other jQuery plugins for the UI.</p>
<p>But first, the file structure.</p>
<p><strong>/db</strong> &#8211; The directory that has all the server and database related files </p>
<ol>
<li><strong>env.php</strong> &#8211; environment settings for database, server and miscellaneous display options</li>
<li><strong>generate-db.php</strong> &#8211; creates a database based on the details set in the env. file</li>
<li><strong>create-table.php</strong> -creates a table based on the details set in the env. file</li>
<li><strong>connect-db.php </strong>&#8211; global include for databases connection</li>
</ol>
<p><strong>/api</strong> &#8211; The directory that has all endpoint related files </p>
<ol>
<li><strong>create.php</strong> &#8211; all the code and mySQL statements for inserting records</li>
<li><strong>delete.php</strong> &#8211; all the code and mySQL statements  for deleting records</li>
<li><strong>index.php</strong> &#8211; all the code and mySQL statements  for showing rows based on the current page</li>
<li><strong>update.php </strong>&#8211; all the code and mySQL statements  for updating records</li>
</ol>
<p><strong>/js/index.js</strong> &#8211; The file that handles all page events </p>
<ol>
<li><strong>displayBookList() </strong>&#8211; displays the initial list of all books with pagination</li>
<li><strong>displayPageEntries() &#8211;</strong> displays books for the current page</li>
<li><strong>refreshList(data) </strong>&#8211;  universal function to refresh the content of the table, takes in data.</li>
<li><strong>View book</strong> &#8211; has all the code to display a record</li>
<li><strong>Create book</strong> &#8211; code to add a new record</li>
<li><strong>Edit book </strong> &#8211; all the code to fill in the edit form with current data</li>
<li><strong>Update book </strong>&#8211; code to update a record</li>
</ol>
<p><strong> /index.php</strong> &#8211; Is the main file that contains all elements, our app will use modal windows to display the forms. </p>
<figure class="wp-block-image size-large"><img loading="lazy" width="298" height="382" class="wp-image-2799" src="https://www.chiefofstack.com/wp-content/uploads/2021/01/file-structure.jpg" alt="" srcset="https://www.chiefofstack.com/wp-content/uploads/2021/01/file-structure.jpg 298w, https://www.chiefofstack.com/wp-content/uploads/2021/01/file-structure-234x300.jpg 234w" sizes="(max-width: 298px) 100vw, 298px" /></figure>
<p>Let&#8217;s start.</p>
<p><strong>Step 1: Take care of the database. </strong>These files are for global use but create-table.php and generate-db.php are used only once.</p>
<p><em>.env.php</em> </p>
<pre class="wp-block-code">&lt;?php
// Database info
$server = "localhost";
$user = "root";
$pass = "";
$db_name = "awesomedb";
$table_name = "books";

// Server URL
$url = "http://localhost/";

$display_rows = 10;

?&gt;</pre>
<p><em>generate-db.php</em> </p>
<pre class="wp-block-code">&lt;?php
include_once("env.php");

// Create connection
$connection = new mysqli($server, $user, $pass);

// Check connection
if ($connection-&gt;connect_error) {
    die("ERROR: Could not connect " . $connection-&gt;connect_error);
}

// Create new database
$sql = "CREATE DATABASE `$db_name`";

if($connection-&gt;query($sql) === TRUE){
    echo "Database created successfully";
} else {
    echo "ERROR: Unable to execute $sql. " . $connection-&gt;error;
}

// Close connection
$connection-&gt;close();

?&gt;</pre>
<p><em>create-table.php</em> </p>
<pre class="wp-block-code">&lt;?php
include_once("connect-db.php");

// Create new table
$sql = "CREATE TABLE `$table_name` (
            id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
            title VARCHAR(191) NOT NULL,
            author VARCHAR(191) NOT NULL,
            published_date DATE,
            last_modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
            status ENUM('active', 'pending', 'deleted')
        )";

if($connection-&gt;query($sql) === TRUE){
    echo "Table '".$table_name."' created successfully";
} else {
    echo "Error creating table: " . $connection-&gt;error;
}
 
// Close connection
$connection-&gt;close();

?&gt;</pre>
<p><em>connect-db.php</em> </p>
<pre class="wp-block-code">&lt;?php
include_once("env.php");

// Create connection
$connection = new mysqli($server, $user, $pass, $db_name);

// Check connection
if ($connection-&gt;connect_error) {
    die("ERROR: Could not connect " . $connection-&gt;connect_error);
}
 

?&gt;</pre>
<p><strong>Step 2: Prepare the endpoints. </strong>These files run the mySQL queries for the operations. This is where the magic actually happens.</p>
<p><em>create.php</em> </p>
<pre class="wp-block-code">&lt;?php
require_once('../db/connect-db.php');

// Add new record
$sql = "INSERT INTO `$table_name` ( `title`, `author`, `published_date`) VALUES ( '".$_POST['title']."', '".$_POST['author']."', '".$_POST['published_date']."')";
$result = $connection-&gt;query($sql);

// Return value
$sql = "SELECT * FROM $table_name ORDER BY id DESC LIMIT 1";
$result = $connection-&gt;query($sql);
$data = $result-&gt;fetch_assoc();
echo json_encode($data);
?&gt;</pre>
<p><em>index.php</em> </p>
<pre class="wp-block-code">&lt;?php
require_once('../db/connect-db.php');
 
$page = (isset($_GET["page"])) ? $_GET["page"] : 1;
$start_from = ($page-1) * $display_rows;

// Get all rows for selected page
$sql = "SELECT * FROM $table_name ORDER BY id DESC LIMIT $start_from, $display_rows";
$result = $connection-&gt;query($sql);
while($row = $result-&gt;fetch_assoc()){
    $json[] = $row;
}
$data['data'] = $json;

// Get total count of all books
$sql = "SELECT COUNT(*) AS total FROM $table_name";
$result = $connection-&gt;query($sql);
$values = mysqli_fetch_assoc($result);
$data['total'] = $values['total'];

// Return books
echo json_encode($data);
?&gt;
</pre>
<p><em>update.php</em> </p>
<pre class="wp-block-code">&lt;?php
require_once('../db/connect-db.php');

// Update record
$sql = "UPDATE `$table_name` SET `title` = '".$_POST['title']."', `author` = '".$_POST['author']."', `published_date` = '".$_POST['published_date']."' WHERE `id` = ".$_POST['id']."";
$result = $connection-&gt;query($sql);

// Return value
$sql = "SELECT * FROM $table_name WHERE `id` = '".$_POST['id']."'";
$result = $connection-&gt;query($sql);
$data = $result-&gt;fetch_assoc();
echo json_encode($data);
?&gt;</pre>
<p><em>delete.php</em> </p>
<pre class="wp-block-code">&lt;?php
require_once('../db/connect-db.php');
$id  = $_POST["id"];

// Delete record
$sql = "DELETE FROM $table_name WHERE id = '".$id."'";

if($connection-&gt;query($sql) === TRUE){
    echo json_encode([$id]);
} else {
    echo "Error deleting record " . $connection-&gt;error;
}

// Close connection
$connection-&gt;close(); 
?&gt;</pre>
<p><strong>Step 3: Design the user interface. </strong>Page elements like lists, pagination, buttons and modal windows allows for user interaction. We used a few jQuery plugins to improve  the UI like twbsPagination, bootstrap-validator, jQueryUI and toast to display notifications </p>
<figure class="wp-block-image size-large"><img loading="lazy" width="1190" height="759" class="wp-image-2806" src="https://i1.wp.com/www.chiefofstack.com/wp-content/uploads/2021/01/deleted-1.jpg?fit=710%2C453&amp;ssl=1" alt="" srcset="https://www.chiefofstack.com/wp-content/uploads/2021/01/deleted-1.jpg 1190w, https://www.chiefofstack.com/wp-content/uploads/2021/01/deleted-1-300x191.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2021/01/deleted-1-1024x653.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2021/01/deleted-1-768x490.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2021/01/deleted-1-1060x676.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2021/01/deleted-1-550x351.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2021/01/deleted-1-784x500.jpg 784w" sizes="(max-width: 1190px) 100vw, 1190px" /></figure>
<figure class="wp-block-image size-large"><img loading="lazy" width="1184" height="777" class="wp-image-2807" src="https://i1.wp.com/www.chiefofstack.com/wp-content/uploads/2021/01/edit-1.jpg?fit=710%2C466&amp;ssl=1" alt="" srcset="https://www.chiefofstack.com/wp-content/uploads/2021/01/edit-1.jpg 1184w, https://www.chiefofstack.com/wp-content/uploads/2021/01/edit-1-300x197.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2021/01/edit-1-1024x672.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2021/01/edit-1-768x504.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2021/01/edit-1-1060x696.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2021/01/edit-1-550x362.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2021/01/edit-1-762x500.jpg 762w" sizes="(max-width: 1184px) 100vw, 1184px" /></figure>
<p><em>index.php</em> </p>
<pre class="wp-block-code">&lt;?php require_once("db/env.php"); ?&gt;
&lt;!doctype html&gt;
&lt;html lang="en"&gt;
    &lt;head&gt;
        &lt;!-- Meta tags --&gt;
        &lt;meta charset="utf-8"&gt;
        &lt;meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"&gt;

        &lt;!-- CSS --&gt;
        &lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"&gt;
        &lt;link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"&gt;

        &lt;!-- JS --&gt;
        &lt;script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"&gt;&lt;/script&gt;
        &lt;script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"&gt;&lt;/script&gt;
        &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"&gt;&lt;/script&gt;
        &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/twbs-pagination/1.4.2/jquery.twbsPagination.min.js" integrity="sha512-frFP3ZxLshB4CErXkPVEXnd5ingvYYtYhE5qllGdZmcOlRKNEPbufyupfdSTNmoF5ICaQNO6SenXzOZvoGkiIA==" crossorigin="anonymous"&gt;&lt;/script&gt;
        &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/1000hz-bootstrap-validator/0.11.5/validator.min.js"&gt;&lt;/script&gt;
	    &lt;script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"&gt;&lt;/script&gt;
        &lt;link href="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css" rel="stylesheet"&gt;

        &lt;!-- Custom JS  --&gt;
        &lt;script type="text/javascript"&gt;
            var url = "&lt;?php echo $url; ?&gt;";
            var display_rows = "&lt;?php echo $display_rows; ?&gt;";

            $(function(){
                $("#published_date").datepicker({ dateFormat: 'yy-mm-dd' });
                $("#published_date_edit").datepicker({ dateFormat: 'yy-mm-dd' });
            });
        &lt;/script&gt;

        &lt;!-- API JS files --&gt;
        &lt;script src="js/index.js"&gt;&lt;/script&gt;

        &lt;title&gt;Trial Project for Worker Bee TV - Submitted by Jay Acab chiefofstack.com &lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div class="container"&gt;
            &lt;div class="row mt-4"&gt;
    		    &lt;div class="col-lg-12"&gt;
    		        &lt;div class="float-left"&gt;
    		            &lt;h2&gt;Books&lt;/h2&gt;
    		        &lt;/div&gt;
    		        &lt;div class="float-right"&gt;
        				&lt;button type="button" class="btn btn-success" data-toggle="modal" data-target="#create-book"&gt;
        					Add New Book
        				&lt;/button&gt;
    		        &lt;/div&gt;
    		    &lt;/div&gt;
    		&lt;/div&gt;

    		&lt;table class="table table-bordered table-striped text-muted text-center mt-3"&gt;
    			&lt;thead&gt;
    			    &lt;tr&gt;
        				&lt;th&gt;Date Published&lt;/th&gt;
        				&lt;th&gt;Author name&lt;/th&gt;
                        &lt;th&gt;Book Title&lt;/th&gt;
        				&lt;th&gt;Action&lt;/th&gt;
    			    &lt;/tr&gt;
    			&lt;/thead&gt;
    			&lt;tbody&gt;
    			&lt;/tbody&gt;
    		&lt;/table&gt;

    		&lt;ul id="pagination" class="pagination-sm"&gt;&lt;/ul&gt;
        &lt;/div&gt;

        &lt;!-- View Book Modal --&gt;
        &lt;div id="view-book" class="modal"  tabindex="-1" role="dialog" aria-labelledby="modalLabel"&gt;
            &lt;div class="modal-dialog" role="document"&gt;
                &lt;div class="modal-content"&gt;
                    &lt;div class="modal-header"&gt;
                        &lt;div&gt;
                            &lt;h4 class="modal-title float-left" id="modalLabel"&gt;Book Information&lt;/h4&gt;
                        &lt;/div&gt;
                        &lt;div&gt;
                            &lt;button type="button" class="close float-right" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;×&lt;/span&gt;&lt;/button&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;div class="modal-body"&gt;
                        &lt;form id="view-book-form" data-toggle="validator" action="api/create.php" method="POST"&gt;
                            &lt;div class="form-group"&gt;
                                &lt;label class="control-label" for="title"&gt;Title:&lt;/label&gt;
                                &lt;p id="title_view" name="title" class="font-weight-bold" /&gt;&lt;/p&gt;
                            &lt;/div&gt;
                            &lt;div class="form-group"&gt;
                                &lt;label class="control-label" for="author"&gt;Author:&lt;/label&gt;
                                &lt;p id="author_view" name="author"  class="font-weight-bold"/&gt;&lt;/p&gt;
                            &lt;/div&gt;
                            &lt;div class="form-group"&gt;
                                &lt;label class="control-label" for="published_date"&gt;Date Published:&lt;/label&gt;
                                &lt;p id="published_date_view" name="published_date" class="font-weight-bold" /&gt;&lt;/p&gt;
                            &lt;/div&gt;
                            &lt;div class="form-group"&gt;
                                &lt;label class="control-label" for="id"&gt;ID:&lt;/label&gt;
                                &lt;p id="id_view" name="id" class="font-weight-bold" /&gt;&lt;/p&gt;
                            &lt;/div&gt;
                        &lt;/form&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;

        &lt;!-- Create Book Modal --&gt;
        &lt;div id="create-book" class="modal"  tabindex="-1" role="dialog" aria-labelledby="modalLabel"&gt;
            &lt;div class="modal-dialog" role="document"&gt;
                &lt;div class="modal-content"&gt;
                    &lt;div class="modal-header"&gt;
                        &lt;div&gt;
                            &lt;h4 class="modal-title float-left" id="modalLabel"&gt;Add a Book&lt;/h4&gt;
                        &lt;/div&gt;
                        &lt;div&gt;
                            &lt;button type="button" class="close float-right" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;×&lt;/span&gt;&lt;/button&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;div class="modal-body"&gt;
                        &lt;form id="create-book-form" data-toggle="validator" action="api/create.php" method="POST"&gt;
                            &lt;div class="form-group"&gt;
                                &lt;label class="control-label" for="title"&gt;Title:&lt;/label&gt;
                                &lt;input type="text" id="title" name="title" class="form-control" data-error="Please enter book title." required /&gt;
                                &lt;div class="help-block with-errors text-danger"&gt;&lt;/div&gt;
                            &lt;/div&gt;
                            &lt;div class="form-group"&gt;
                                &lt;label class="control-label" for="author"&gt;Author:&lt;/label&gt;
                                &lt;input type="text" id="author" name="author" class="form-control" data-error="Please enter the name of the author." required&gt;
                                &lt;div class="help-block with-errors text-danger"&gt;&lt;/div&gt;
                            &lt;/div&gt;
                            &lt;div class="form-group"&gt;
                                &lt;label class="control-label" for="published_date"&gt;Date Published:&lt;/label&gt;
                                &lt;input type="text" id="published_date" name="published_date" class="form-control" data-error="Please enter the date when the book was published." required autocomplete="off"&gt;
                                &lt;div class="help-block with-errors text-danger"&gt;&lt;/div&gt;
                            &lt;/div&gt;
                            &lt;div class="form-group mt-4"&gt;
                                &lt;button type="submit" class="btn submit-book btn-success"&gt;Submit&lt;/button&gt;
                            &lt;/div&gt;
                        &lt;/form&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;

        &lt;!-- Edit Book Modal --&gt;
        &lt;div id="edit-book" class="modal"  tabindex="-1" role="dialog" aria-labelledby="modalLabel"&gt;
            &lt;div class="modal-dialog" role="document"&gt;
                &lt;div class="modal-content"&gt;
                    &lt;div class="modal-header"&gt;
                        &lt;div&gt;
                            &lt;h4 class="modal-title float-left" id="modalLabel"&gt;Edit Book&lt;/h4&gt;
                        &lt;/div&gt;
                        &lt;div&gt;
                            &lt;button type="button" class="close float-right" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;×&lt;/span&gt;&lt;/button&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;div class="modal-body"&gt;
                        &lt;form id="edit-book-form" data-toggle="validator" action="api/update.php" method="put"&gt;
                            &lt;input type="hidden" id="id" name="id" class="edit-id"&gt;
                            &lt;div class="form-group"&gt;
                                &lt;label class="control-label" for="title_edit"&gt;Title:&lt;/label&gt;
                                &lt;input type="text" id="title_edit" name="title" class="form-control" data-error="Please enter book title." required /&gt;
                                &lt;div class="help-block with-errors text-danger"&gt;&lt;/div&gt;
                            &lt;/div&gt;
                            &lt;div class="form-group"&gt;
                                &lt;label class="control-label" for="author_edit"&gt;Author:&lt;/label&gt;
                                &lt;input type="text" id="author_edit" name="author" class="form-control" data-error="Please enter the name of the author." required&gt;
                                &lt;div class="help-block with-errors text-danger"&gt;&lt;/div&gt;
                            &lt;/div&gt;
                            &lt;div class="form-group"&gt;
                                &lt;label class="control-label" for="published_date_edit"&gt;Date Published:&lt;/label&gt;
                                &lt;input type="text" id="published_date_edit" name="published_date" class="form-control" data-error="Please enter the date when the book was published." required autocomplete="off"&gt;
                                &lt;div class="help-block with-errors text-danger"&gt;&lt;/div&gt;
                            &lt;/div&gt;
                            &lt;div class="form-group mt-4"&gt;
                                &lt;button type="submit" class="btn submit-book-edit btn-success"&gt;Submit&lt;/button&gt;
                            &lt;/div&gt;
                        &lt;/form&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;

    &lt;/body&gt;
&lt;/html&gt;</pre>
<p><strong>Step 4: Handle the events. </strong>This file brings your page to life. It connects page events to the endpoints to complete the operation.</p>
<p><em>index.js</em> </p>
<pre class="wp-block-code">$(document).ready(function() {

/* Initialize the index */
var page = 1;
var current_page = 1;
var total_page = 0;
var display = "list";

/* Display Initial List of Books */
if(display=="list")
    displayBookList();
 
/* View book */
$("body").on("click",".view-book",function(){
    var id = $(this).parent("td").data('id');
    var title = $(this).parent("td").prev("td").text();
    var author = $(this).parent("td").prev("td").prev("td").text();
    var published_date = $(this).parent("td").prev("td").prev("td").prev("td").text();
    display = "details";

    $("#id_view").text(id);
    $("#title_view").text(title);
    $("#author_view").text(author);
    $("#published_date_view").text(published_date);
});

/* Create new book */
$('#create-book-form').on('submit', function(e){
    e.preventDefault();
    var form_action = $("#create-book-form").attr("action");
    var title = $("#title").val();
    var author = $("#author").val();
    var published_date = $("#published_date").val();
    display = "create";

    if(title != '' &amp;&amp; author != '' &amp;&amp; published_date !=''){
        $.ajax({
            dataType: 'json',
            type:'POST',
            url: url + form_action,
            data:{
                title:title,
                author:author,
                published_date:published_date
            }
        }).done(function(data){
            // Reset Form
            $("#title").val('');
            $("#author").val('');
            $("#published_date").val('');

            // Display new item on the list
            displayPageEntries();

            // Hide modal
            $("#create-book").modal('hide');
            toastr.success('Item Created Successfully.', 'Success Alert', {timeOut: 5000});
        });
    }else{
        alert('All fields are required. Please make sure you fill out all fields correctly.')
    }
});

/* Edit book */
$("body").on("click",".edit-book",function(){
    var id = $(this).parent("td").data('id');
    var title = $(this).parent("td").prev("td").text();
    var author = $(this).parent("td").prev("td").prev("td").text();
    var published_date = $(this).parent("td").prev("td").prev("td").prev("td").text();
    display = "edit";

    $("#title_edit").val(title);
    $("#author_edit").val(author);
    $("#published_date_edit").val(published_date);
    $("#edit-book-form").find(".edit-id").val(id);
});

/* Update book */
$('#edit-book-form').on('submit', function(e){
    e.preventDefault();

    var form_action = $("#edit-book-form").attr("action");
    var title = $("#title_edit").val();
    var author = $("#author_edit").val();
    var published_date = $("#published_date_edit").val();
    var id = $("#edit-book-form").find(".edit-id").val();


    if(title != '' &amp;&amp; author != '' &amp;&amp; published_date !=''){
        $.ajax({
            dataType: 'json',
            type:'POST',
            url: url + form_action,
            data:{
                id:id,
                title:title,
                author:author,
                published_date:published_date
            }
        }).done(function(data){
            // Reset Form
            $("#title_edit").val('');
            $("#author_edit").val('');
            $("#published_date_edit").val('');

            // Display new item on the list
            displayPageEntries();

            // Hide modal
            $("#edit-book").modal('hide');
            toastr.success('Item Updated Successfully.', 'Success Alert', {timeOut: 5000});
        });
    }else{
        alert('All fields are required. Please make sure you fill out all fields correctly.')
    }

});

/* Delete book */
$("body").on("click",".delete-book",function(){
    var id = $(this).parent("td").data('id');
    $.ajax({
        dataType: 'json',
        type:'POST',
        url: url + 'api/delete.php',
        data:{ id:id }
    }).done(function(data){
        displayPageEntries();
        toastr.success('Item Deleted Successfully.', 'Success Alert', {timeOut: 5000});
    });
});

/* Display initial list of all books with pagination */
function displayBookList() {
    $.ajax({
        dataType: 'json',
        url: url+'api/index.php',
        data: {page:page}
    }).done(function(data){
    	total_page = Math.ceil(data.total/display_rows);
    	current_page = page;
    	refreshList(data.data);


        $('#pagination').twbsPagination({
	        totalPages: total_page,
	        visiblePages: current_page,
	        onPageClick: function (event, pageL) {
	        	page = pageL;

                    displayPageEntries();

	        }
	    });

    });
}

/* Display books for current page*/
function displayPageEntries() {
	$.ajax({
    	dataType: 'json',
    	url: url+'api/index.php',
    	data: {page:page}
	}).done(function(data){
		refreshList(data.data);
	});
}

/* Refresh table list  */
function refreshList(data) {
	var	rows = '';
	$.each(data,function(key,value) {
	  	rows = rows + '&lt;tr&gt;';
	  	rows = rows + '&lt;td&gt;'+value.published_date+'&lt;/td&gt;';
	  	rows = rows + '&lt;td&gt;'+value.author+'&lt;/td&gt;';
        rows = rows + '&lt;td&gt;'+value.title+'&lt;/td&gt;';
	  	rows = rows + '&lt;td data-id="'+value.id+'"&gt;';
        rows = rows + '&lt;button data-toggle="modal" data-target="#view-book" class="btn btn-primary btn-sm view-book"&gt;View Details&lt;/button&gt; ';
        rows = rows + '&lt;button data-toggle="modal" data-target="#edit-book" class="btn btn-primary btn-sm edit-book"&gt;Edit Book&lt;/button&gt; ';
        rows = rows + '&lt;button class="btn btn-danger btn-sm delete-book"&gt;Delete&lt;/button&gt;';
        rows = rows + '&lt;/td&gt;';
	  	rows = rows + '&lt;/tr&gt;';
	});
	$("tbody").html(rows);
}

});</pre>
<p style="text-align: center;"><a class="button" href="http://projects.chiefofstack.com/ajax-crud/" target="_blank" rel="noopener noreferrer">LAUNCH TEST PROJECT</a></p>
<p>I grouped it into 4 basic steps to make the process of building the app more straight forward. On this test project without using a proper MVC framework (using only PHP, mySQL and jQuery) we have completed an AJAX CRUD app complete with notification and pagination.</p>
<p>This is important because there will be times that a programmer will be limited by the technology he can use and that’s when it pays to know the basics. I hope you enjoyed this tutorial, please share it to someone who might need it. Thanks!</p>
<p> </p>

		</div>
	</div>
</div></div></div></div><p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2021/01/23/basic-ajax-crud-app-using-php-mysql-and-jquery/">Basic AJAX CRUD app using PHP, MySQL and jQuery</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chiefofstack.com/2021/01/23/basic-ajax-crud-app-using-php-mysql-and-jquery/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>EDSA U-turn tunnel and street level bus stop with pedestrian overpass; A design solution to improve UX</title>
		<link>https://www.chiefofstack.com/2020/12/02/edsa-u-turn-tunnel-and-street-level-bus-stop-with-pedestrian-overpass-a-design-solution-to-improve-ux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edsa-u-turn-tunnel-and-street-level-bus-stop-with-pedestrian-overpass-a-design-solution-to-improve-ux</link>
					<comments>https://www.chiefofstack.com/2020/12/02/edsa-u-turn-tunnel-and-street-level-bus-stop-with-pedestrian-overpass-a-design-solution-to-improve-ux/#respond</comments>
		
		<dc:creator><![CDATA[Jay Acab]]></dc:creator>
		<pubDate>Wed, 02 Dec 2020 20:02:44 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<guid isPermaLink="false">https://www.chiefofstack.com/?p=2707</guid>

					<description><![CDATA[<p>As exercise on user experience design, I often take physical real world problems and try to think of innovative solutions to solve it. On this post, I will try to give a solution to the... </p>
<p class="more"><a class="more-link" href="https://www.chiefofstack.com/2020/12/02/edsa-u-turn-tunnel-and-street-level-bus-stop-with-pedestrian-overpass-a-design-solution-to-improve-ux/">Read More</a></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/12/02/edsa-u-turn-tunnel-and-street-level-bus-stop-with-pedestrian-overpass-a-design-solution-to-improve-ux/">EDSA U-turn tunnel and street level bus stop with pedestrian overpass; A design solution to improve UX</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>As exercise on user experience design, I often take physical real world problems and try to think of innovative solutions to solve it. On this post, I will try to give a solution to the U-turn slot closure in EDSA while also addressing the unpleasant commuter experience on the new bus stops.<img loading="lazy" width="624" height="568" src=""></p>



<p>First, if I were to design a bus stop I would prioritize commuter experience. Instead of an overpass I would put the access on street level. So commuters won&#8217;t have to walk up a flight of stairs and go back down again when riding on and off the buses. Then the new shorter overpass will be for those who want to cross the other side.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="875" height="596" src="https://www.chiefofstack.com/wp-content/uploads/2020/12/extended-bus-stop.jpg" alt="" class="wp-image-2708" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/12/extended-bus-stop.jpg 875w, https://www.chiefofstack.com/wp-content/uploads/2020/12/extended-bus-stop-300x204.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2020/12/extended-bus-stop-768x523.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2020/12/extended-bus-stop-550x375.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2020/12/extended-bus-stop-734x500.jpg 734w" sizes="(max-width: 875px) 100vw, 875px" /><figcaption>Photo for reference only. The new bus stop will extend all the way to the inner most lane.</figcaption></figure>



<p>This will make it more accessible for everyone especially the elderly and PWDs.&nbsp; This will also negate the need for escalators, elevators and long footbridge which also increases the safety of the commuters.</p>



<p>&nbsp;I would also like to retain the right side doors of the buses so we can still maintain global standards (coz they said that doors will be moved to the left side of the buses).</p>



<p>Basically it would be like an extra wide pedestrian lane in EDSA.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="814" height="395" src="https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-bus-stop-pedestrian-lane-1.jpg" alt="" class="wp-image-2713" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-bus-stop-pedestrian-lane-1.jpg 814w, https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-bus-stop-pedestrian-lane-1-300x146.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-bus-stop-pedestrian-lane-1-768x373.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-bus-stop-pedestrian-lane-1-550x267.jpg 550w" sizes="(max-width: 814px) 100vw, 814px" /><figcaption>A bike lane beside the sidewalk and an extra wide pedestrian lane to access the bus stop and pedestrian overpass</figcaption></figure>



<p>Wait what? But wouldn&#8217;t it cause inconvenience for private vehicles? Yes, but that will be solved by the second part of my solution, which is a vehicular underpass or tunnel.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1333" height="996" src="https://i0.wp.com/www.chiefofstack.com/wp-content/uploads/2020/12/u-turn-tunnel-EDSA-1.jpg?fit=710%2C530&amp;ssl=1" alt="" class="wp-image-2714" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/12/u-turn-tunnel-EDSA-1.jpg 1333w, https://www.chiefofstack.com/wp-content/uploads/2020/12/u-turn-tunnel-EDSA-1-300x224.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2020/12/u-turn-tunnel-EDSA-1-1024x765.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/12/u-turn-tunnel-EDSA-1-768x574.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2020/12/u-turn-tunnel-EDSA-1-1060x792.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2020/12/u-turn-tunnel-EDSA-1-550x411.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2020/12/u-turn-tunnel-EDSA-1-669x500.jpg 669w" sizes="(max-width: 1333px) 100vw, 1333px" /><figcaption>The tunnel will feature a U-turn slot. The Bus way will remain at street level while all private vehicles go under the tunnel.</figcaption></figure>



<p>This way private vehicles can pass by under the bus stops unimpeded (Buses will remain on street level). Car users won&#8217;t mind going through a few tunnels compared to commuters walking up and down flight of stairs.  This system takes into consideration the balance between different types of users.</p>



<p>Sure, this will be costlier but building an overpass with escalators and factoring in its regular maintenance isn&#8217;t necessarily cheap.</p>



<p>I don&#8217;t really know the figures yet but the tunnel will also feature two U-turn slots for both north bound and south bound vehicles. Which to me, would make the investment more worth it as it will solve traffic problems caused by the recent closure of U-turn slots in EDSA.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1758" height="1734" src="https://i0.wp.com/www.chiefofstack.com/wp-content/uploads/2020/12/edsa-busway-u-turn-tunnel-at-grade-bus-stops-pedestrian-lane-overpass.jpg?fit=710%2C700&amp;ssl=1" alt="" class="wp-image-2712" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-busway-u-turn-tunnel-at-grade-bus-stops-pedestrian-lane-overpass.jpg 1758w, https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-busway-u-turn-tunnel-at-grade-bus-stops-pedestrian-lane-overpass-300x296.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-busway-u-turn-tunnel-at-grade-bus-stops-pedestrian-lane-overpass-1024x1010.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-busway-u-turn-tunnel-at-grade-bus-stops-pedestrian-lane-overpass-768x758.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-busway-u-turn-tunnel-at-grade-bus-stops-pedestrian-lane-overpass-1536x1515.jpg 1536w, https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-busway-u-turn-tunnel-at-grade-bus-stops-pedestrian-lane-overpass-1060x1046.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-busway-u-turn-tunnel-at-grade-bus-stops-pedestrian-lane-overpass-550x542.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-busway-u-turn-tunnel-at-grade-bus-stops-pedestrian-lane-overpass-507x500.jpg 507w, https://www.chiefofstack.com/wp-content/uploads/2020/12/edsa-busway-u-turn-tunnel-at-grade-bus-stops-pedestrian-lane-overpass-1095x1080.jpg 1095w" sizes="(max-width: 1758px) 100vw, 1758px" /><figcaption>Instead of commuters moving up and down stairs, cars will go down a tunnel.</figcaption></figure>



<p>We have already built tunnels like the Quezon boulevard and Lagusnilad tunnels in Manila. The only thing left to do is solve the engineering part of the U-turn slots. &nbsp;If this is feasible, then we have improved 3 user experiences: We have provided an open space &#8211; commuter friendly bus stop, a U-turn slot that won&#8217;t interfere with the bus way, a shorter pedestrian overpass for those crossing the other side and an unimpeded private vehicle flow. What do you think, is this even technically possible?</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="584" height="438" src="https://www.chiefofstack.com/wp-content/uploads/2020/12/img_0378.jpg" alt="" class="wp-image-2715" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/12/img_0378.jpg 584w, https://www.chiefofstack.com/wp-content/uploads/2020/12/img_0378-300x225.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2020/12/img_0378-550x413.jpg 550w" sizes="(max-width: 584px) 100vw, 584px" /><figcaption>Quezon Blvd. Tunnel in Quiapo, Manila</figcaption></figure>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" src="https://www.chiefofstack.com/wp-content/uploads/2020/12/lagusnilad.jpg" alt="" class="wp-image-2716" width="592" height="395" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/12/lagusnilad.jpg 500w, https://www.chiefofstack.com/wp-content/uploads/2020/12/lagusnilad-300x200.jpg 300w" sizes="(max-width: 592px) 100vw, 592px" /><figcaption>Lagusnilad Tunnel in Manila</figcaption></figure>



<p>While I congratulate the government for the success of the EDSA bus way itself, much is left to be desired in terms of commuter experience. &nbsp;I know there is a MOA already for a overpass concourse that features escalators.</p>



<p>I commend the efforts of the government especially the DOTr, MMDA, DPWH, LTFRB in streamlining the bus routes in and around Metro Manila. Finally, after so many years we have designated bus stops. I hope we can improve the system to the point that we have time of arrival and departure for each bus.</p>



<p><br></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/12/02/edsa-u-turn-tunnel-and-street-level-bus-stop-with-pedestrian-overpass-a-design-solution-to-improve-ux/">EDSA U-turn tunnel and street level bus stop with pedestrian overpass; A design solution to improve UX</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chiefofstack.com/2020/12/02/edsa-u-turn-tunnel-and-street-level-bus-stop-with-pedestrian-overpass-a-design-solution-to-improve-ux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>When to do a website refresh vs redesign; A case study of Digest.ph</title>
		<link>https://www.chiefofstack.com/2020/11/16/when-to-do-a-website-refresh-vs-redesign-a-case-study-of-digest-ph/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=when-to-do-a-website-refresh-vs-redesign-a-case-study-of-digest-ph</link>
					<comments>https://www.chiefofstack.com/2020/11/16/when-to-do-a-website-refresh-vs-redesign-a-case-study-of-digest-ph/#respond</comments>
		
		<dc:creator><![CDATA[Jay Acab]]></dc:creator>
		<pubDate>Mon, 16 Nov 2020 10:14:26 +0000</pubDate>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Design]]></category>
		<guid isPermaLink="false">https://www.chiefofstack.com/?p=2681</guid>

					<description><![CDATA[<p>TLDR; If your website still does it&#8217;s job, just do a refresh. If your website has become stagnant for a long time, consider a redesign. I&#8217;m going to cite one of our projects Digest.ph as... </p>
<p class="more"><a class="more-link" href="https://www.chiefofstack.com/2020/11/16/when-to-do-a-website-refresh-vs-redesign-a-case-study-of-digest-ph/">Read More</a></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/11/16/when-to-do-a-website-refresh-vs-redesign-a-case-study-of-digest-ph/">When to do a website refresh vs redesign; A case study of Digest.ph</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>TLDR; If your website still does it&#8217;s job, just do a refresh. If your website has become stagnant for a long time, consider a redesign.</p>



<p>I&#8217;m going to cite one of our projects <a rel="noreferrer noopener" href="https://www.digest.ph" target="_blank">Digest.ph</a> as an example throughout the article. Over a month ago, I was tempted to do a full revamp of our design in order to best accommodate recommendations from <a rel="noreferrer noopener" href="https://worksofhe.art/" target="_blank">Works of Heart</a> (WOH; design and branding experts; one of our mentors from AIM-DBI). But given Digest&#8217;s limited time and resources, the best decision was to go for a refresh (more on this below).</p>



<h2>Struggles of a start-up website</h2>



<p>WOH audited the website and among the comments were to make the copy more bespoke and buttons snappy. They want us to tailor fit the homepage for a specific type of customer. All suggestions were geared towards marketing and making the website convert.</p>



<p>With fresh eyes and their comments in mind,  I proceeded to revisit our site and found that they were right &#8211; it was bad, LOL. Our homepage was uninspired and unorganized, the color palette has 50 shades of blue and the copy didn&#8217;t give clear call to action. People were showed a lot of information without any clear direction where to go. </p>



<figure class="wp-block-image size-large"><img loading="lazy" width="701" height="1024" src="https://www.chiefofstack.com/wp-content/uploads/2020/11/tarth-homepage-09-29-2020-701x1024.png" alt="" class="wp-image-2682" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/11/tarth-homepage-09-29-2020-701x1024.png 701w, https://www.chiefofstack.com/wp-content/uploads/2020/11/tarth-homepage-09-29-2020-205x300.png 205w, https://www.chiefofstack.com/wp-content/uploads/2020/11/tarth-homepage-09-29-2020-768x1122.png 768w, https://www.chiefofstack.com/wp-content/uploads/2020/11/tarth-homepage-09-29-2020-1051x1536.png 1051w, https://www.chiefofstack.com/wp-content/uploads/2020/11/tarth-homepage-09-29-2020-1402x2048.png 1402w, https://www.chiefofstack.com/wp-content/uploads/2020/11/tarth-homepage-09-29-2020-1060x1549.png 1060w, https://www.chiefofstack.com/wp-content/uploads/2020/11/tarth-homepage-09-29-2020-550x804.png 550w, https://www.chiefofstack.com/wp-content/uploads/2020/11/tarth-homepage-09-29-2020-342x500.png 342w, https://www.chiefofstack.com/wp-content/uploads/2020/11/tarth-homepage-09-29-2020-739x1080.png 739w, https://www.chiefofstack.com/wp-content/uploads/2020/11/tarth-homepage-09-29-2020.png 1920w" sizes="(max-width: 701px) 100vw, 701px" /><figcaption>As startups go, pivots are pretty common. And it showed when we ended up with a homepage that displayed all products in one go.</figcaption></figure>



<p>Digest pivoted three times since the project started,  more features were added as the business model got finalized. The homepage UI took a back seat and functionality became the priority.  Having no full time graphic artist didn&#8217;t help either (though I double as the graphic artist when needed), it became visible that our assets were not coordinated.</p>



<p>I recommended to improve the UI and logo while the company finalizes its branding strategy. But it was a though decision for the company because the priority was on product development&#8230;  not necessarily on marketing or making the site convert yet. </p>



<h2>Breakthrough: Going back to the old prototype.</h2>



<p>Luckily I was able to remember my original prototype from a year ago, it already had all the pieces that we needed for a quick refresh. I just had to integrate our primary product and the new logo. If you look at the finished homepage it may look like we did a redesign but since we just brought back some elements from the prototype I will consider it a refresh (borderline redesign :D). Anyway, the new graphical assets were quick adjustments.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1920" height="938" src="https://i1.wp.com/www.chiefofstack.com/wp-content/uploads/2020/11/original-mockup.jpg?fit=710%2C347&amp;ssl=1" alt="" class="wp-image-2685" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/11/original-mockup.jpg 1920w, https://www.chiefofstack.com/wp-content/uploads/2020/11/original-mockup-300x147.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2020/11/original-mockup-1024x500.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/11/original-mockup-768x375.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2020/11/original-mockup-1536x750.jpg 1536w, https://www.chiefofstack.com/wp-content/uploads/2020/11/original-mockup-1060x518.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2020/11/original-mockup-550x269.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2020/11/original-mockup-1023x500.jpg 1023w" sizes="(max-width: 1920px) 100vw, 1920px" /><figcaption>All the elements we needed were already available. I only needed to put them in their right place on the current site and update the graphic assets. Then write a simple yet effective copy to make the homepage more cohesive.</figcaption></figure>



<p>This time I wanted to answer the 5 W&#8217;s and 1 H of our users. The intro section answers &#8216;what&#8217; the website is all about and &#8220;where&#8221; to go to continue (See the &#8220;Talk to a Lawyer&#8221; heading and the &#8220;Let&#8217;s go&#8221; button). The second section explains &#8216;how&#8217; it works (See the video explainer).  The third section answers  &#8216;why&#8217; users would want to use Digest&#8217;s services.  The fourth section shows &#8216;who&#8217; the lawyers are. And finally, the fifth section answers &#8216;when&#8217; to talk with lawyers (See the &#8220;Ok find me a lawyer now&#8221; call to action button).</p>



         <style>
             #player69b1bda46bd15.h5vp_player { width: px; border-radius: 0px; overflow: hidden; }        </style>
        <div id="h5vp_player">
            <div data-unique-id="69b1bda46bd3b" id="player69b1bda46bd15" class="h5vp_player h5vp_player_initializer" data-settings="{&quot;options&quot;:{&quot;controls&quot;:[&quot;play-large&quot;,&quot;play&quot;,&quot;progress&quot;,&quot;current-time&quot;,&quot;mute&quot;,&quot;volume&quot;,&quot;settings&quot;,&quot;pip&quot;,&quot;download&quot;,&quot;fullscreen&quot;],&quot;loop&quot;:{&quot;active&quot;:true},&quot;muted&quot;:false,&quot;hideControls&quot;:true,&quot;autoplay&quot;:true},&quot;infos&quot;:{&quot;source&quot;:&quot;https:\/\/www.chiefofstack.com\/wp-content\/uploads\/2020\/11\/digest-philippines-website-refresh-developer-web-development-web-developer-.webm&quot;,&quot;poster&quot;:&quot;https:\/\/www.chiefofstack.com\/wp-content\/uploads\/2020\/11\/digest-ph-website-refresh-developer.png&quot;,&quot;skin&quot;:&quot;default&quot;,&quot;pause_other&quot;:&quot;&quot;}}">
                <video playsinline poster="https://www.chiefofstack.com/wp-content/uploads/2020/11/digest-ph-website-refresh-developer.png"  autoplay >
                    <source src="https://www.chiefofstack.com/wp-content/uploads/2020/11/digest-philippines-website-refresh-developer-web-development-web-developer-.webm" type="video/mp4">
                    Your browser does not support the video tag.
                </video>
            </div>
        </div>
        



<h2>When to do a refresh vs redesign</h2>



<p>A refresh is pretty much like trying a new paint in your house. Do it if you want a quick way of highlighting new changes to your business.</p>



<ul><li>If there&#8217;s a new company logo, you may want your color palette and typefaces to match it.</li><li>If there&#8217;s a new primary product, you should adjust your promotional content, replace outdated copy, set new call to actions and do on page SEO.</li><li>When you want to improve user experience,  you have to guide users to go where you want them to go. This may involve updating the navigation, search filters, modal windows and other combination of elements.</li></ul>



<p>A redesign on the other hand is like a home renovation. It&#8217;s like starting from scratch while considering all features already on the site.</p>



<ul><li>If your website looks dated and content has been stagnant for years, if it doesn&#8217;t have a friendly user experience,  takes too long to load, it&#8217;s your cue to do a redesign.</li><li>If the company underwent a rebrand, you may want to keep your  media assets, typefaces, colors, UX and copy current to reflect the new brand personality.</li><li>If the website doesn&#8217;t use current tech that increases your site&#8217;s probability to convert  (Ex. Responsiveness, PWA etc..)</li><li>If you want to integrate marketing technology to track and analyze product performance (Ex. Adding shopping experience to sell and track products will drastically change the look of your website) </li><li>If you are incorporating a new digital strategy whether through content marketing, social media, advertising or other SEO practices, it will require a new strategy for your content and design.</li></ul>



<p>Any time a website is set to be updated it&#8217;s almost always because of marketing and conversion. It can be that the company may want to prioritize the visibility of one product, selling a new product, doing a rebrand, introducing a new feature or just improving user experience.</p>



<p>A refresh done consistently over time is often a better approach than a full redesign or revamp. A constantly refreshed website means that it is  continuously maintained to keep up to date with the company&#8217;s offerings.</p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/11/16/when-to-do-a-website-refresh-vs-redesign-a-case-study-of-digest-ph/">When to do a website refresh vs redesign; A case study of Digest.ph</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chiefofstack.com/2020/11/16/when-to-do-a-website-refresh-vs-redesign-a-case-study-of-digest-ph/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Improving site speed: Time to First Byte (TTFB)</title>
		<link>https://www.chiefofstack.com/2020/09/22/improving-site-speed-time-to-first-byte-ttfb/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=improving-site-speed-time-to-first-byte-ttfb</link>
					<comments>https://www.chiefofstack.com/2020/09/22/improving-site-speed-time-to-first-byte-ttfb/#respond</comments>
		
		<dc:creator><![CDATA[Jay Acab]]></dc:creator>
		<pubDate>Tue, 22 Sep 2020 03:58:31 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://www.chiefofstack.com/?p=2654</guid>

					<description><![CDATA[<p>More than half of visits are abandoned if a page doesn&#8217;t load within 3 seconds, this translates to a huge loss in potential sales and leaves a bad impression to users. Speed is now also... </p>
<p class="more"><a class="more-link" href="https://www.chiefofstack.com/2020/09/22/improving-site-speed-time-to-first-byte-ttfb/">Read More</a></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/09/22/improving-site-speed-time-to-first-byte-ttfb/">Improving site speed: Time to First Byte (TTFB)</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>More than half of visits are abandoned if a page doesn&#8217;t load within 3 seconds, this translates to a huge loss in potential sales and leaves a bad impression to users. Speed is now also a landing page factor for Google Search and though it cannot be proven that an improved Time to First Byte (TTFB) increases Page Rank, there is enough correlation to believe so. Take AMP pages, Google Search now favors AMP pages in their results. Accelerated Mobile Pages (AMP) are stripped down versions of HTML that makes loading on mobile devices faster. </p>



<p>So what really is TTFB? and what affects it?  TTFB  is the metric to focus on if you want to drastically improve your page load time, technically it is affected by these 3 things:</p>



<ol><li>The time it takes for your request to propagate through the network to the web server</li><li>The time it takes for the web server to process the request and generate the response</li><li>The time it takes for the response to propagate back through the network to your browser.</li></ol>



<figure class="wp-block-image size-large"><img loading="lazy" width="971" height="264" src="https://www.chiefofstack.com/wp-content/uploads/2020/09/ttfb-no-caching-no-cdn.jpg" alt="" class="wp-image-2675" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/09/ttfb-no-caching-no-cdn.jpg 971w, https://www.chiefofstack.com/wp-content/uploads/2020/09/ttfb-no-caching-no-cdn-300x82.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2020/09/ttfb-no-caching-no-cdn-768x209.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2020/09/ttfb-no-caching-no-cdn-550x150.jpg 550w" sizes="(max-width: 971px) 100vw, 971px" /><figcaption><em>DNS time, socket time, SSL time, redirect time, and backend processing took around 6 seconds</em></figcaption></figure>



<p>In layman&#8217;s term, it&#8217;s just the time when the first byte of the page arrive (after any redirects). You don&#8217;t want to look at a waterfall chart like the one above where the first 3 items took around 6 seconds. </p>



<p>As an engineer, you need to take care of 3 things to be able to improve TTFB: </p>



<ol><li>Proper use of a Content Delivery Network (CDN) to reduce latency</li><li>Use of dynamic cache or page cache to reduce server processing.</li><li>Compression and minification of web assets to decrease loading</li></ol>



<h4>Proper use of a CDN</h4>



<p>With a CDN you reduce the physical distance and the number of hops an asset take to reach its destination. For example, the user is from Manila and the server is in New York, a CDN server in between (say Singapore) can deliver a jpeg file faster than the actual server in New York. Cloudflare CDN saves static content to it&#8217;s network of servers around the world then serve those cached content from edge servers nearest the next visitor.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1081" height="766" src="https://i0.wp.com/www.chiefofstack.com/wp-content/uploads/2020/09/cloudflare-page-rules.png?fit=710%2C503&amp;ssl=1" alt="" class="wp-image-2665" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/09/cloudflare-page-rules.png 1081w, https://www.chiefofstack.com/wp-content/uploads/2020/09/cloudflare-page-rules-300x213.png 300w, https://www.chiefofstack.com/wp-content/uploads/2020/09/cloudflare-page-rules-1024x726.png 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/09/cloudflare-page-rules-768x544.png 768w, https://www.chiefofstack.com/wp-content/uploads/2020/09/cloudflare-page-rules-1060x751.png 1060w, https://www.chiefofstack.com/wp-content/uploads/2020/09/cloudflare-page-rules-550x390.png 550w, https://www.chiefofstack.com/wp-content/uploads/2020/09/cloudflare-page-rules-706x500.png 706w" sizes="(max-width: 1081px) 100vw, 1081px" /><figcaption><em>&#8220;Cache everything&#8221; page rule in Cloudflare</em></figcaption></figure>



<p>TIP: If you have a static site like a blog or a basic company website,  just use the &#8220;Cache everything&#8221; page rule in Cloudflare. Using that will greatly improve your TTFB even if you only use an economy web host because most requests will be served from the edge cache and won&#8217;t actually touch your server. Just make sure to add another page rule to bypass caching of admin and dynamic pages.</p>



<h4>Caching and Compression</h4>



<figure class="wp-block-image size-large"><img loading="lazy" width="830" height="380" src="https://www.chiefofstack.com/wp-content/uploads/2020/09/WP-fastest-cache-1.png" alt="" class="wp-image-2663" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/09/WP-fastest-cache-1.png 830w, https://www.chiefofstack.com/wp-content/uploads/2020/09/WP-fastest-cache-1-300x137.png 300w, https://www.chiefofstack.com/wp-content/uploads/2020/09/WP-fastest-cache-1-768x352.png 768w, https://www.chiefofstack.com/wp-content/uploads/2020/09/WP-fastest-cache-1-550x252.png 550w" sizes="(max-width: 830px) 100vw, 830px" /><figcaption><em>The WordPress Fastest Cache plugin saves pages in cache to reduce server processing time</em></figcaption></figure>



<p>Content Management Systems (CMS) generate pages on demand through the use of PHP and MySQL server requests. By using dynamic or file cache, commonly accessed pages can be stored in a file (or in memory) to reduce server processing time. You can think of it as the recent calls in your phone&#8217;s history, if you want to call someone again you don&#8217;t have to go through the trouble of finding that person in your phone book. </p>



<p>In Laravel, I simply run <code>npm run production </code> in my terminal and let Webpack take care of bundling the assets (minifying and compression) and then use my favorite package to cache pages. In WordPress, there&#8217;s a lot of plugins to cache pages (I regularly use WP Fastest Cache and WP Super cache plugins). I like WP Fastest Cache because it has options to minimize and compress CSS and JS files automatically. Whatever the framework is, the goal is always to reduce the time it takes for requests to reach users.</p>



<h4>Measuring TTFB</h4>



<figure class="wp-block-image size-large"><img loading="lazy" width="1126" height="871" src="https://i0.wp.com/www.chiefofstack.com/wp-content/uploads/2020/09/Webpagetest.org-first-byte-test.jpg?fit=710%2C549&amp;ssl=1" alt="" class="wp-image-2667" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/09/Webpagetest.org-first-byte-test.jpg 1126w, https://www.chiefofstack.com/wp-content/uploads/2020/09/Webpagetest.org-first-byte-test-300x232.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2020/09/Webpagetest.org-first-byte-test-1024x792.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/09/Webpagetest.org-first-byte-test-768x594.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2020/09/Webpagetest.org-first-byte-test-1060x820.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2020/09/Webpagetest.org-first-byte-test-550x425.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2020/09/Webpagetest.org-first-byte-test-646x500.jpg 646w" sizes="(max-width: 1126px) 100vw, 1126px" /><figcaption><em>This site&#8217;s results in webpagetest.org</em> <em>where the First Byte time is only 300ms.</em></figcaption></figure>



<p>To be able to improve your TTFB you have to be able to measure it properly. There are a number of tools to measure site speed and TTFB, one tool that I always use is WebPageTest.org. There you can place your site&#8217;s URL and test location (from where you want to simulate the speed) and in less than a minute you will get a detailed waterfall of all resources being loaded on a page.</p>



<p></p>



<p></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/09/22/improving-site-speed-time-to-first-byte-ttfb/">Improving site speed: Time to First Byte (TTFB)</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chiefofstack.com/2020/09/22/improving-site-speed-time-to-first-byte-ttfb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Tips to make working from home a success during and post pandemic</title>
		<link>https://www.chiefofstack.com/2020/07/07/tips-to-make-working-from-home-a-success-during-and-post-pandemic/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tips-to-make-working-from-home-a-success-during-and-post-pandemic</link>
					<comments>https://www.chiefofstack.com/2020/07/07/tips-to-make-working-from-home-a-success-during-and-post-pandemic/#respond</comments>
		
		<dc:creator><![CDATA[Jay Acab]]></dc:creator>
		<pubDate>Tue, 07 Jul 2020 00:09:33 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://www.chiefofstack.com/?p=2636</guid>

					<description><![CDATA[<p>On our first AIM-DBI program orientation we were asked what we do to keep ourselves sane during the quarantine, I answered the usual &#8211; exercise, playing the guitar and bingeing on Netflix. But then I... </p>
<p class="more"><a class="more-link" href="https://www.chiefofstack.com/2020/07/07/tips-to-make-working-from-home-a-success-during-and-post-pandemic/">Read More</a></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/07/07/tips-to-make-working-from-home-a-success-during-and-post-pandemic/">Tips to make working from home a success during and post pandemic</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>On our first AIM-DBI program orientation we were asked what we do to keep ourselves sane during the quarantine, I answered the usual &#8211; exercise, playing the guitar and bingeing on Netflix. But then I realized, not much has really changed in my routine during the lock-down. I mean, I&#8217;ve been doing this (work from home) for the most part of my professional career that I subconsciously structured my life in a way that I can be successful and well for the most part.. sane.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="666" src="https://www.chiefofstack.com/wp-content/uploads/2020/07/digest-aim-dbi-thincohort-orientation-2020-1024x666.jpg" alt="" class="wp-image-2639" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/07/digest-aim-dbi-thincohort-orientation-2020-1024x666.jpg 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/07/digest-aim-dbi-thincohort-orientation-2020-300x195.jpg 300w, https://www.chiefofstack.com/wp-content/uploads/2020/07/digest-aim-dbi-thincohort-orientation-2020-768x500.jpg 768w, https://www.chiefofstack.com/wp-content/uploads/2020/07/digest-aim-dbi-thincohort-orientation-2020-1060x690.jpg 1060w, https://www.chiefofstack.com/wp-content/uploads/2020/07/digest-aim-dbi-thincohort-orientation-2020-550x358.jpg 550w, https://www.chiefofstack.com/wp-content/uploads/2020/07/digest-aim-dbi-thincohort-orientation-2020.jpg 1280w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>AIM-DBI THINCOHORT  2020 ONLINE ORIENTATION</figcaption></figure>



<p>People think that working from home is straightforward,  how hard can it be, you just sit in front of the computer the whole day. Not gonna blame them though,  there&#8217;s a lot of &#8220;get rich quick &#8211; work from home&#8221; schemes out there, but make no mistake becoming a successful work from home professional is no easy feat. There&#8217;s a lot of hurdles to overcome. </p>



<p><strong>Have your own workspace</strong><br>Can be a room, a cubicle or just a desk, whatever it may be you should treat it as a &#8220;safe zone&#8221; where you are free from non-work related stuff. Maybe you have a kid who constantly nag you, or you share your room with your annoying sibling, or you probably work in your living room. No matter your situation, your workspace should be sacred. It&#8217;s your job to make sure that people around you know that. It&#8217;s your chapel, a place where you can think clearly, organize your thoughts and focus on your tasks.  No one should be able to disrupt your train of thought, you must impose restrictions, one example can be to require them to ask for your permission to talk to you (drastic but effective) when you are in your space.</p>



<p><strong>Get up and exercise</strong><br>Being active releases happy hormones and working happy is a success in itself. You will be more creative and it helps you think more clearly.  But not all physical activities are the same, just because you sweat doesn&#8217;t mean you are exercising (doing household chores doesn&#8217;t count). You have to dedicate an hour or two everyday for an actual exercise &#8211; bike, yoga, run or body weight training. Commit to a workout plan and soon you will see what a well maintained body does to your thoughts. Another benefit of being active is that it keeps you occupied hence no time for negativity. For me, it gives me time o think of all the positive things I want to accomplish.</p>



<p><strong>Read and learn new things</strong><br>Keep learning, your knowledge is your edge. Aside from being active physically you should strive to keep your mind active as well &#8211; reading books, attending online classes, watching tutorials are great ways to learn new things. Knowledgeable people more often than not give better solutions to client problems and guess what, your boss appreciate workers who have gumption to resolve their their problems. It also show to potential clients that you are open to continued learning if ever a need arise.</p>



<p><strong>Have a schedule.</strong><br>Have a schedule and follow it religiously. Repetition leads to success. Make your bed @ 6am, run @ 7am, it&#8217;s really up to you, completing a task however small it may seem gives you confidence to do the next one which will eventually carry over to your work and so on. But be careful not to overload your day, tweak it little by little to come up with something that works for you. Do, assess, revise, repeat.</p>



<p><strong>Backup Backup Backup.</strong><br>Have a cloud based backup and one or two external drives. Trust me, this is the best investment you can do for yourself. Better have copies laying around for when the time comes, it will save you tons of hours of work. There were several instances where I lost all my files because I was too complacent that my main machine won&#8217;t bug down and my drives won&#8217;t be stolen (yeah, burglar/s went in my apartment). I lost all my files and had to start everything from scratch. Have multiple backups, your future self will thank you for it.</p>



<p><strong>Secure your workspace</strong><br>Aside from software security you also have to deal with physically securing your laptop (whatever your main weapon is) and your backups. This may sound too cautious and that&#8217;s what I thought too until the burglar incident. They stole all of my laptops, my backups and in one day all of my life&#8217;s work were gone entirely. Remember, you are not working in an office environment where there&#8217;s 24/7 security, this is going to be your responsibility. Have a safe if needed.</p>



<p><strong>Legitimize your services</strong><br>It took me years before I finally decided to legitimize my online services but when I did there was no looking back. Aside from the prestige and benefits of having your own business,  all big companies require an official receipt in order to pay your compensation. In order to land big clients you have to be legit. Registering your service as a freelance professional was a complex endeavor, back then the requirements were for brick and mortar businesses, I was moving a lot so that was not really an option for me, but in the last 5 years it has became easier to register yourself as a professional. </p>



<p><strong>Strive for work life integration</strong><br>For me work life balance is overrated, it&#8217;s work life integration that we should be after. It&#8217;s not your regular 9 to 5 work day where you can clock out at 5 and leave work behind, you have to be able to come to work at 9, put it on hold for a while (to do private things) and get back an hour later to where you were, this happens several times a day until you are ready to call it a day. It can be weird at first, but integrating work as part of your life  is one of the key factors to become successful.  The saying &#8220;find a job you love and you&#8217;ll never work a day in your life&#8221; is applicable in this type of setup.</p>



<p>Working from home is a marathon not a sprint, just be patient, be consistent and have the courage to do the small things, pretty soon you will be doing amazing things! Good luck.</p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/07/07/tips-to-make-working-from-home-a-success-during-and-post-pandemic/">Tips to make working from home a success during and post pandemic</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chiefofstack.com/2020/07/07/tips-to-make-working-from-home-a-success-during-and-post-pandemic/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install PHP 7 and Composer on Windows 10 through  Ubuntu in WSL</title>
		<link>https://www.chiefofstack.com/2020/06/05/install-php-7-and-composer-on-windows-10-through-ubuntu-in-wsl/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=install-php-7-and-composer-on-windows-10-through-ubuntu-in-wsl</link>
					<comments>https://www.chiefofstack.com/2020/06/05/install-php-7-and-composer-on-windows-10-through-ubuntu-in-wsl/#respond</comments>
		
		<dc:creator><![CDATA[Jay Acab]]></dc:creator>
		<pubDate>Fri, 05 Jun 2020 20:01:15 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://www.chiefofstack.com/?p=2610</guid>

					<description><![CDATA[<p>A major advantage of using this setup over the more common XAMPP development environment is that with Ubuntu in WSL, the PHP 7 installation will be the 64 bit variant, as opposed to XAMPP where... </p>
<p class="more"><a class="more-link" href="https://www.chiefofstack.com/2020/06/05/install-php-7-and-composer-on-windows-10-through-ubuntu-in-wsl/">Read More</a></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/06/05/install-php-7-and-composer-on-windows-10-through-ubuntu-in-wsl/">Install PHP 7 and Composer on Windows 10 through  Ubuntu in WSL</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>A major advantage of using this setup over the more common XAMPP development environment is that with Ubuntu in WSL, the PHP 7 installation will be the 64 bit variant, as opposed to XAMPP where PHP is only available at x86. Using 64bit PHP means more memory for running composer for big projects. </p>



<p>Recently one of our projects got too big and I encountered memory allocation error when I ran composer update. I did this as a workaround and fortunately there was no more issues after I&#8217;m done </p>



<p>I assume you already have WSL running on your machine, here are the steps I did to install Composer and PHP 7.0.</p>



<h2>Install PHP inside Ubuntu </h2>



<p>First update the package list. </p>



<p><code>$ sudo apt-get update</code></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1048" height="563" src="https://i0.wp.com/www.chiefofstack.com/wp-content/uploads/2020/06/Screenshot_1.png?fit=710%2C381&amp;ssl=1" alt="" class="wp-image-2612" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/06/Screenshot_1.png 1048w, https://www.chiefofstack.com/wp-content/uploads/2020/06/Screenshot_1-300x161.png 300w, https://www.chiefofstack.com/wp-content/uploads/2020/06/Screenshot_1-1024x550.png 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/06/Screenshot_1-768x413.png 768w, https://www.chiefofstack.com/wp-content/uploads/2020/06/Screenshot_1-550x295.png 550w, https://www.chiefofstack.com/wp-content/uploads/2020/06/Screenshot_1-931x500.png 931w" sizes="(max-width: 1048px) 100vw, 1048px" /></figure>



<p>Then just install php 7.0:  </p>



<p><code>$ sudo apt-get install -y php7.0</code></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1048" height="563" src="https://i1.wp.com/www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl.png?fit=710%2C381&amp;ssl=1" alt="" class="wp-image-2614" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl.png 1048w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl-300x161.png 300w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl-1024x550.png 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl-768x413.png 768w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl-550x295.png 550w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl-931x500.png 931w" sizes="(max-width: 1048px) 100vw, 1048px" /></figure>



<p>It may take a while to setup some stuff&#8230;</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1048" height="563" src="https://i0.wp.com/www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl2.png?fit=710%2C381&amp;ssl=1" alt="" class="wp-image-2615" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl2.png 1048w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl2-300x161.png 300w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl2-1024x550.png 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl2-768x413.png 768w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl2-550x295.png 550w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-php-7-ubuntu-wsl2-931x500.png 931w" sizes="(max-width: 1048px) 100vw, 1048px" /></figure>



<p>If everything goes well PHP 7.0 will be installed. Verify it by simply running:  </p>



<p><code>$ php -v</code></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1048" height="563" src="https://i0.wp.com/www.chiefofstack.com/wp-content/uploads/2020/06/check-php-version.png?fit=710%2C381&amp;ssl=1" alt="" class="wp-image-2616" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/06/check-php-version.png 1048w, https://www.chiefofstack.com/wp-content/uploads/2020/06/check-php-version-300x161.png 300w, https://www.chiefofstack.com/wp-content/uploads/2020/06/check-php-version-1024x550.png 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/06/check-php-version-768x413.png 768w, https://www.chiefofstack.com/wp-content/uploads/2020/06/check-php-version-550x295.png 550w, https://www.chiefofstack.com/wp-content/uploads/2020/06/check-php-version-931x500.png 931w" sizes="(max-width: 1048px) 100vw, 1048px" /></figure>



<h2>Install Composer inside Ubuntu </h2>



<p>To install Composer we follow the official instructions <a rel="noreferrer noopener" href="https://getcomposer.org/download/" target="_blank">here</a>. Run the following commands:</p>



<p><code>$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"</code></p>



<pre class="wp-block-preformatted"><code>$ php -r "if (hash_file('sha384', 'composer-setup.php') === 'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"</code></pre>



<p><code>php composer-setup.php</code></p>



<p><code>$ php -r "unlink('composer-setup.php');"</code></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1048" height="563" src="https://i0.wp.com/www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl.png?fit=710%2C381&amp;ssl=1" alt="" class="wp-image-2617" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl.png 1048w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl-300x161.png 300w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl-1024x550.png 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl-768x413.png 768w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl-550x295.png 550w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl-931x500.png 931w" sizes="(max-width: 1048px) 100vw, 1048px" /></figure>



<p>Composer is now installed! test it out by running. </p>



<p><code>$ php composer.phar</code></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1048" height="563" src="https://i2.wp.com/www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl3.png?fit=710%2C381&amp;ssl=1" alt="" class="wp-image-2618" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl3.png 1048w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl3-300x161.png 300w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl3-1024x550.png 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl3-768x413.png 768w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl3-550x295.png 550w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl3-931x500.png 931w" sizes="(max-width: 1048px) 100vw, 1048px" /></figure>



<p>You can optionally add composer to your global path to make to make it easier to use.   </p>



<p><code>sudo mv composer.phar /usr/local/bin/compose</code></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1048" height="563" src="https://i2.wp.com/www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl4.png?fit=710%2C381&amp;ssl=1" alt="" class="wp-image-2620" srcset="https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl4.png 1048w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl4-300x161.png 300w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl4-1024x550.png 1024w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl4-768x413.png 768w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl4-550x295.png 550w, https://www.chiefofstack.com/wp-content/uploads/2020/06/install-composer-ubuntu-wsl4-931x500.png 931w" sizes="(max-width: 1048px) 100vw, 1048px" /></figure>



<p>Windows Subsystem for Linux was made for developers and offers all the benefits that comes from using a dedicated Linux machine. With WSL you can run your favorite Windows apps and execute Linux commands natively just like how I installed PHP 7 and Composer inside Ubuntu on our Windows 10 PC. </p>



<p></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/06/05/install-php-7-and-composer-on-windows-10-through-ubuntu-in-wsl/">Install PHP 7 and Composer on Windows 10 through  Ubuntu in WSL</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chiefofstack.com/2020/06/05/install-php-7-and-composer-on-windows-10-through-ubuntu-in-wsl/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>3 most essential principles of responsive design</title>
		<link>https://www.chiefofstack.com/2020/05/30/3-most-essential-principles-of-responsive-design/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=3-most-essential-principles-of-responsive-design</link>
					<comments>https://www.chiefofstack.com/2020/05/30/3-most-essential-principles-of-responsive-design/#respond</comments>
		
		<dc:creator><![CDATA[Jay Acab]]></dc:creator>
		<pubDate>Sat, 30 May 2020 17:41:48 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">http://chiefofstack.jay/?p=2578</guid>

					<description><![CDATA[<p>Responsive web design is built on several principles to work properly. Below are the three most essential principles of a responsive website to get you started. Fluid grids Media queries Flexible images and media NOTE:... </p>
<p class="more"><a class="more-link" href="https://www.chiefofstack.com/2020/05/30/3-most-essential-principles-of-responsive-design/">Read More</a></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/05/30/3-most-essential-principles-of-responsive-design/">3 most essential principles of responsive design</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Responsive web design is built on several principles to work properly. Below are the three most essential principles of a responsive website to get you started.</p>



<ol><li>Fluid grids</li><li>Media queries</li><li>Flexible images and media</li></ol>



<p class="has-cyan-bluish-gray-color has-text-color"><em>NOTE: This article was originally posted at iStar&#8217;s blog, read the full article <a href="https://www.istarwebsolutions.com/web-design/3-most-essential-principles-of-responsive-design/" target="_blank" rel="noreferrer noopener">here</a></em></p>



<p><strong>Fluid Grids</strong>&nbsp;– Old websites were based on print media like newspapers and magazines. Columns were positioned and displayed in absolute size and position (pixels). Mobile devices changed all this, instead of solely relying on pixels for measurement, responsive design incorporated percentages to the mix to accommodate the growing number of resolutions.&nbsp;Fluid grids or “flexible grid” is the backbone of responsive design. It uses relative sizing to fit content to the device’s screen size. The grids are based on percentages. By basing text size, widths, and margins on percentages, a fixed size can be turned into a size relative to its display space.&nbsp;The name is a little misleading because a grid is not the only thing that makes it flexible, it relies on CSS to position the content.</p>



<p><strong>Media Queries</strong>&nbsp;–&nbsp;Also known as breakpoints, it can be used to apply different styles based on what the screen can handle. The website detects the type of device you’re using (resolution/viewport) and correctly displays the content. This can be observed by resizing your desktop browser to different sizes, you will notice how a responsive site adjusts to best display the content. It can be customized to control the width, height, max-width, max-height, device-height, orientation, aspect ratio, etc.</p>



<p><strong>Flexible images and media</strong>&nbsp;– Aside from the layout and text, images also needs to respond correctly. This&nbsp;allows your images and other media to load differently for every resolution. It can be achieved through scaling(CSS max-width) or cropping (CSS overflow property).&nbsp;With scaling the media element’s max width can be set at 100 percent so the browser will make it shrink or expand depending on the container. Cropping on the other hand hides portion of the image and still fit it to the container.</p>



<p>There are other things that come into play with responsive design, the above items will get you started and is enough if you know what you are doing. If you would like assistance regarding responsive design or if you are interested with any of our services, please don’t hesitate to contact us, our programmers are always ready to help.</p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/05/30/3-most-essential-principles-of-responsive-design/">3 most essential principles of responsive design</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chiefofstack.com/2020/05/30/3-most-essential-principles-of-responsive-design/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Top 5 characteristics of an effective website</title>
		<link>https://www.chiefofstack.com/2020/05/30/top-5-characteristics-of-an-effective-website/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=top-5-characteristics-of-an-effective-website</link>
					<comments>https://www.chiefofstack.com/2020/05/30/top-5-characteristics-of-an-effective-website/#respond</comments>
		
		<dc:creator><![CDATA[Jay Acab]]></dc:creator>
		<pubDate>Sat, 30 May 2020 17:36:47 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">http://chiefofstack.jay/?p=2571</guid>

					<description><![CDATA[<p>No one visits your website just to read your company’s mission and vision. Gone are the days when you only had to write your business objectives, add your company picture and call it a website.... </p>
<p class="more"><a class="more-link" href="https://www.chiefofstack.com/2020/05/30/top-5-characteristics-of-an-effective-website/">Read More</a></p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/05/30/top-5-characteristics-of-an-effective-website/">Top 5 characteristics of an effective website</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>No one visits your website just to read your company’s mission and vision. Gone are the days when you only had to write your business objectives, add your company picture and call it a website. Nowadays, millenials are expecting more.</p>



<p class="has-cyan-bluish-gray-color has-text-color"><em>NOTE: This article was originally posted at iStar&#8217;s blog, read the full article <a href="https://www.istarwebsolutions.com/web-design/top-5-characteristics-of-an-effective-website/" target="_blank" rel="noreferrer noopener">here</a></em></p>



<p>Aside from the usual interactivity, usability and social media integration, here are the top 5 basic characteristics your website must have in order to accommodate today’s users.</p>



<ol><li><strong>Fast loading speed</strong>&nbsp;– Your website needs to load fast. Yeah, call me captain obvious but there is actually a science behind this. Study shows that it takes an average of 3 seconds for a user to scan your page. The user must be able to reach the information he came for within said period so he can decide whether to stay or go. Test your user’s patience and say goodbye to a potential client. A good way to enhance speed is by lazy loading images found below the fold so elements at the top load faster.</li><li><strong>Well Formatted Content</strong>&nbsp;– Your design is important but nowadays (as it should) content is king. A user may take his business elsewhere if he can’t easily reach the information he came for. Consider putting your most important content above the fold to make it easily scan-able.</li><li><strong>Mobile compatibility / Mobile first</strong>&nbsp;– Google now ranks mobile first websites higher in search rankings. Mobile usage has eclipsed desktop this past few years and there is a good chance your potential client is using mobile exclusively. Your website must be responsive to be able to accommodate a wide range of mobile devices. See this previous post about responsive design [link to responsive website article]</li><li><strong>Cross browser compatibility</strong>&nbsp;– With each new browser version come a new interpretation of html/css. For example, back in the old days a transparency effect will be rendered by Firefox and Chrome but will need a different set of code for IE. Modern browsers had come a long way in making sure they comply with standards, which made the browsing experience somewhat consistent across all browsers. However there are still some quirks that may affect your website. Why browsers render differently is a question for the ages, it’s up to you to adapt. Your website must show consistency on all browsers, a line of text on one browser should also render properly on other browsers. That way a potential client can read your information no matter what browser he is using. It’s a delicate balance between features and compatibility, it is recommended to select features that you know is consistent across all browsers.</li><li><strong>Easy to use forms</strong>&nbsp;– Forms are essential on any business websites. It is the main area where users interact with the site and usually where leads come from. Make sure to make your forms easy to use and accessible. Add tooltips and suggestions on important fields if possible, limit the total number of fields and most importantly assign a label for all the fields.</li></ol>



<p>Ensuring your website is effective in delivering content on all types of devices improves your chances of getting a lead to potential clients. Your website is the face of your company and you need to make sure it’s engaging to prevent users from leaving, you did a lot of marketing to get them there, and your next goal should be to get them to stay. Following the above can help make your online presence a success.</p>
<p>The post <a rel="nofollow" href="https://www.chiefofstack.com/2020/05/30/top-5-characteristics-of-an-effective-website/">Top 5 characteristics of an effective website</a> appeared first on <a rel="nofollow" href="https://www.chiefofstack.com">Chief of Stack</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chiefofstack.com/2020/05/30/top-5-characteristics-of-an-effective-website/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
