?

Log in

No account? Create an account
Learning to Program Again - Ddk's Journal [entries|archive|friends|userinfo]
synergetic

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Learning to Program Again [Apr. 14th, 2016|11:49 pm]
synergetic
[Tags|, , ]

I'm taking a bit of time to do a bunch of things I haven't done in a while. One of them involves coding.

So, at work, we have insane levels of calls, and things have been a bit bad recently. That's a different story and it seems like it might be calming down, or at least reaching that crisis level that might result in things happening. Anyway, I digress.

One of the things we don't have is any kind of call logging system. I decided I wanted to try to expand my coding skills a bit and needed a project. Then I put the need at work for a call logging system together with the need for a project and, wham, I've been beavering away on it ever since.

It's been an interesting journey. Part of me really, really doesn't want to touch code at all, especially not in any work setting. Too many bad memories. On the other hand, another part of of me is finding the whole thing therapeutic.

The bizarre thing is how well it's going. So, I decided to try a very specific set of technologies. At the moment, the buzzword language is JavaScript. Basically, it's a language that's been used in web browsers since I was little. In fact, I remember learning some of it as an early exercise in coding, way before I was in University.

It was a horrible language because, back then, coding standards regarding it didn't exist, and neither did the DOM. The DOM, or document object model, was a standard they released to allow code to interact with the HTML on a web page.

Since then, there's been lots of standardisation and the DOM has enabled all kinds of cool effects. JavaScript mushroomed as my life went by and, recently, it's started to be used in ways no one would have envisioned.

One way I am using it is to create web pages that don't need reloading to do things. To this end, I'm using Angular, an amazing Javascript framework that wires up web-pages effectively. It's neat.

Angular is good, but it needs something to talk to. There's been a movement to use JavaScript here too, and this is the Next Big Thing. I've been avoiding that like the plague, because at least some of it is that "this is the sexy language of the moment" as well as "we have good technical reasons for this".

Instead, I wanted to stick with languages I knew, so I was going to use PHP. PHP has also moved on since I was using it. I think PHP, more than anything, was the language that convinced other languages that having a dictionary type as an integral part of your language is really useful. Unfortunately, its time has passed as other languages have introduced features and now it's been PHP playing catch up.

One of the things that Ruby introduced was the idea of the framework, or MVC design pattern. This has been a good thing for PHP and stuff has risen up to fill the void in for MVC design patterns. The leading one seems to be Symfony, though Laravel also is popular.

I was going to learn Symfony and use this to write the backend of my application, the part that the Angular talks to. However, I spent a few days struggling with it before going to Python and Django.

I never thought I'd like Python. It's a language [personal profile] pplfichi liked and, for because of the way it was designed, really, really bad for web design. At least, that was, until MVC patterns came along. Now it's pretty awesome because, as I see written everywhere, it's easy to learn. But more then that, me and Django click in some odd way. Me and Symfony don't. Whether it's bad memories, the sex change or what, I don't know, but I'm starting to pledge my allegiance to the Python side of programming.

Django is nice. It describes itself as for "Perfectionists with Deadlines", a philosophy I can absolutely sign off on. It's wonderful because you tell it what you want it to do and it goes and does it. There's lots happening under the hood, but the syntax is warm and welcoming, as opposed to Symfony's syntax, which uses far too many annotations in the comments, which is just wrong.

So far, I've managed to combine a bunch of things in Django and make what's known as a REST framework. A REST framework is a particular type of web-site where the website only communicates in Javascript objects. In other words, it's all content, no mark-up. The idea is that you then filter that information through another web page to make the pretty things appear on the screen. In this case, that's Angular for me.

Angular and Django Rest appear to get on quite well, once I got past Cross Site Forgery Protection, something I really don't understand, but managed to make work. I've constructed simple administration interfaces in Angular and now I'm working on some more complex things.

Where it will go from here, I don't know.
LinkReply