hjertnes.blog

When to do client side and when to do server side

01.03.2018 01:00

When you are doing a web project in 2018 you have the choice between doing most of the heavy lifting server side or client side. The former means that you render most or all of the HTML before it reaches the browser, while the latter means that you only send a minimal HTML file from the server and the browser will use API’s and Javascript on the browser to produce most of what the user end up seeing.

There are pro’s and con’s to both approaches, and there are times when one is better than the other.

If you are developing something where the content is in focus, in other words where the user of your web site are primarily consuming the content like for example a blog then doing more of the work server side is the better approach. Because it will load faster and less resources have to be transferred to the client.

But, if you are developing something where there either is a combo or where user interaction is the primary thing. What we call a web app. For example Gmail, Facebook or Twitter, then doing more on the browser is better. This is because it enables us to do more advanced functionality that in the past was reserved for native apps.

Like always, it depends on what you are building. I see a lot of people bringing in huge frameworks using for example Angular or React when it is unnecessary and the only difference between that and doing it with some backend language like Python or PHP + some plain JavaScript is a lot more JavaScript assets than needed.

Just because a modern framework is there, doesn’t mean it is the right thing for everything. Or for all parts of what you are building

Why I shoot film

01.03.2018 01:00

I shoot both film and digital. And I use them for very different reasons.

When I want to make sure that I end up with some good images I always bring my X-Pro 2. I can shoot duplicates and make sure that I at least have some good images at the end of the day. No matter how the lighting conditions are. But I often bring my 35mm camera instead if I just want to shoot for fun.

If you go for a film camera you can more or less anything. I personally prefer very manual cameras, but you can also get something that are more like a modern DSLR or a point and shoot. The reason I prefer manual cameras is that they just work, even without a battery. And you just expose and shoot. This process is a very useful to really understand how light and the different settings on your camera works together.

The reason people shoot film vary. Some do it because they like the process, others like the simplicity and some because of the look of the films they use.

I shoot film because I enjoy having some stuff in my life that don’t require me to re-charge the batteries all the fucking time. And I really enjoy how the images look. Good black and white film looks much better than anything I have ever gotten out of a digital camera. And I really love how goofy Fuji Superia colour film look. Some do it with filters, I personally prefer to go back to where the Instagram filters or Lightroom Presets go their looks from in the first place.

#

28.02.2018 01:00

Working on a Wordpress XML-RPC compatible server that you can use with Hugo etc.

#

28.02.2018 01:00

Oldpub. I just completed the first “working” version of my Wordpress XML-RPC server. It is far from perfect, and far from complete. But it works with MarsEdit for plain text posts.

#

28.02.2018 01:00

GoDaddy is a weird thing to call your company.

#

28.02.2018 01:00

This is too much fun: KD Pro Disposable Camera

#

28.02.2018 01:00

@aleen

CSS Grid

28.02.2018 01:00

Not JavaScript, but a great place to start if you want to get started with CSS Grids.

Hugo

28.02.2018 01:00

I decided to finally do the inevitable after I got out of the hospital: migrating all of my sites over to Hugo. There are many good reasons for using WordPress, and it is a reason for 30% of the web or something crazy like that runs on it. But it felt like I only used it because it worked with MarsEdit.

Hugo is like Jekyll and Pelican a Static Website Generator. This means that you build all the resources and upload them instead of generating output based on requests.

There are good and bad sides to both. The Hugo approach is less dynamic, while the latter is more dynamic. Some people want or need that dynamic nature of a database driven CMS like WordPress. While others like me are more than happy with something a little bit simpler.

But I’m cheating. Because I have added two servers or backends to my Hugo sites. Or some of them. To enable posting from apps.

I love posting from the Micro.blog apps on both OS X and iOS, which lead me to implementing a simple MicroPub server for it. And I love using MarsEdit, and that lead me to starting to implement a WordPress XML-RPC compliant API for Hugo (or anything like it).

The reason I went with Hugo over Jekyll or Pelican is simple:

  • I hate Ruby with passion

  • I enjoy Python, but for some reason don’t like Pelican.

  • Hugo is written in Go and is ridiculously fast.

  • Hugo supports scheduling posts (which was one of the reasons I dumped Jekyll the last time, and because it was slow).

I’m enjoying using Hugo this far. The awesome thing about Hugo is that it is really easy to make tools that make stuff easier, because you are just dealing with files. And page loads are very fast. The best thing however is not having to deal with WordPress updates.

The next thing is to start looking into making my own templates for some of my sites. And to complete my XML-RPC server.

Is it better than WordPress? For some people. But I didn’t start to enjoy using Hugo before I got up a proper XML-RPC server so that I could use it with MarsEdit.

#

27.02.2018 01:00

Luna. Shot with my Nikon FM, E-Series 50mm F/1.8 with Ilford HP5+ pushed to 800.