Advice for building a new website

Just an update guys, I was looking through the Divi stuff and found a single page template made for MSPs… well that was super easy lol. An afternoon of filling in content and pasting in some CSS and done. Thought this was going to be much harder! Got lucky I guess.

And I see where you guys are coming from, my understanding is that a WordPress site is bloated and thus why they are maybe slower than a custom built site. But we don’t have the money to pay a developer or the time to learn how to make one from scratch (though I’d still like to learn, eventually).

1 Like

Despite the fact that I have strong thoughts about WordPress, there’s no denying how it makes things incredibly easy to do. You can have all sorts going on in next to no time at all, a blog, a simple eCommerce application, etc.

This is true, but like pretty much any mainstream/popular framework/library that’s used in web dev to date is bloated. They simply try to do a bit too much than what they were initially designed to do, I mean it’s cool because you can get ‘a, b, c, …, z’ all in one tool.

Perfectly logical reasoning, can’t argue with that. While I’m against the use of WordPress personally, it’s perfect for your needs, from the sounds of it. If you need any help/advice we’re always happy to help out, if you need any JavaScript advice, honestly I suggest that you talk to myself, or @Dynamic_Gravity.

I personally know JavaScript for the web browser inside and out, I mean I even know crap that I’ll never actually use, and example being:

(-~function(){}-~function(){}) + (-~function(){}-~function(){}) = 4;

Then @Dynamic_Gravity is better than myself when it comes to Node development, as I’ve been learning the MEAN stack, he’s given me some pretty useful pointers.

On the subject of JavaScript, it’s quite funny how you can do multi threading on a client’s machine, but due to how Node it built, you can’t actually do multi threading, there are ways around this. @Dynamic_Gravity informed me how you can spawn child processes, while this may be overkill in information I can’t stop when I go off on one… :joy:

The main difference(s) between threads and processes is that a process has it’s own allocated block of memory, a thread can share memory with another thread. A process in very simple terms is just some executable program, a thread is kinda like a sub-process which is different to a child process. You can also have multiple threads running for one process. Now a child process, you can also have multiple child processes running under one parent process. A child process doesn’t have access to the parent process’s memory allocation, as it has it’s own, however there are ways in which a process can actually share values with another process, a simple idea would be to follow a singleton design pattern.

If you used windows task manager, you can see when a process has child processes, here’s a quick example of what I mean:

image

However, with the task manager, you can’t natively view how many threads a single process is using. If you did see that then you’d have an insane number of duplicated items for all processes(including child processes). There would have to be an ‘advanced view’ feature to view the threads that are being used for each active process, purely because of the sheer amount of information would suddenly appear… :joy:

Based on what you have said: there is no active functionality in your company’s site. As in, no shopping, no contact forms, not comments. no search. Is that right?

If yes, then all you need to do is just make a pure HTML page (with CSS and maybe some JavaScript). The main benefits for it would be: there is no way to hack it and it would be as fast as possible.

But, if your site does have some active functionality (like a contact form), then the easiest would be to just add a small PHP script on top of that HTML. And only for dealing with the sending of that contact form. That would entail securing it (against spamming and email header injections) and sending an email.

1 Like

I’ll second that! :+1:

Even if you have a large amount of content you could store a lot of content in JSON files, you could chain them, etc…

I mean that’s your call, the only reason why I’ve mentioned this is purely down to the fact that I’ve recently developed a client side template engine, works pretty well for the most part. I’m not saying use my code, but I’m trying to emphasise the how you can use some client side template engine, it doesn’t have to be server side.


EDIT:

It’s pretty impressive what you can actually achieve using just HTML, CSS & JavaScript (client side) these days, even with the contact form that @teresko mentioned, you could just process that with something like mail chimp, I guess you’d just have to be somewhat creative in how you do it.

I’m not saying do things this way, especially the whole JSON thing unless you have some app that can manage all of that data in a relatively nice manner. I’m just stating that you can do quite a lot just on the front end, provided you do use the occasional 3rd party back end solution(s), in this case a contact form.

I only know all of these ‘work arounds’ due to one of my previous jobs, I went from a full stack dev to a front end dev, there was essentially no back end, kinda. Long story short the setup is/was a complex mess, and I had to get very creative with JavaScript.

1 Like

Woah this is a load of info. @teresko yes there is no functionality other than the contact form.

I’ll have to re-read this thread tomorrow morning when I’m not drunk

My bad… :joy: … Last I knew it only displayed processes, I know there’s plenty of tools out there that will show all threads per process, but I didn’t know that Windows can do that!

Good man! :joy:

Witch is fine, the only problem with that is that it´s a lot of work to have it look like something and work on every browser without using some sort of UI framework. I´ve mostly only used bootstrap though. Witch I can deffinitely recommend it´s simple and effective. Also did some experimenting with angulars materialize. With only pure HTML+CSS supporting all the popular browsers is gonna be difficult, unless your site is going to be kept very extremely basic looking. Witch is fine if that´s what you´re going for.

Though, I don´t know how much you wanna be learning doing this stuff yourself from the ground up.

Good choice, because with wordpress you can very much make something as a “developer” while not really being a developer at all. You don´t really need to dig into php/css unless you want to customize it a lot. Deffinitely the easiest route.

I probably would not be too concerned about security, since from what you´ve said the site isn´t really gonna be an online shop or something. Make a backup and if people hack it… reinstall it. No big deal. (Except the server runs a lot of other very important secretive programs that you wanna protect) Wordpress can be setup reasonable secure by itself. The problem comes more from installing a bijillion plugins and review none of them.

Alternatively, you could use Joomla, witch is just a different wordpress. I´ve heard from the guy who made the homepage for my parents that he choose Joomla, because wordpress is so unsecure. I didn´t really use either, but i´d put them into the same bin as far as security is concerned and only give Joomla some points because it´s less popular. Wordpress is much more used, hence there is gonna be more people trying to hack into it rather than the less popular CMS.

I personally disagree with a lot of what you just said, but I’m not going to get into a debate over it, I honestly cba for that. If you disagree, fair enough… :stuck_out_tongue:

Cross browser issues aren’t really a thing anymore, trust me, I’ve been developing web apps for years, now it’s actually quite easy to make front end apps that work across the majority of browsers and devices.

As for security… That’s like saying that MS Office is insecure because it’s so popular… I mean more hackers may target it, sure, but in this scenario, but for the sake of argument just know that WP out of the box isn’t what I’d consider secure… Yes being a bigger target because of the market share, I partially agree with that, but that’s far from the sole reason as to why it’s insecure…

You’re implying WP is insecure by design. Can you substantiate that, please?

Not by design, I’m not saying they intentionally made it insecure, it’s just they didn’t exactly build a tonne of features to prevent security breaches, which I can’t say I blame them, that’s not really something you’d expect from something like WP.

IDK I had issues with it when doing a site for my company a few months ago (though it was my first time really using JavaScript and not dodging it the
best I can and my first time ever touching php). Like Edge interpreting currency as a Telefone number (or Skype ID for that matter idk but Google said the color highlighting indicates a telephone number), scaling sometimes broke on Firefox for a while and there was a scroll bar at the bottom even though there should not have been one and there was none on other browsers and html5 elements like the datepicker for months where an experimental and per default disabled feature on Firefox so I ended up getting rid of that again. That’s all I can remember. But I’d expect it to get more if you’re doing everything manuell unless it’s not doing anything something like bootstrap is good for anyways.

Also how do you scale things so people can view it on mobile devices? Witch is an entirely different thing than desktops. Well there is css grid thingy now so maybe that works similarly to bootstraps grid system I have not tried that yet.

I mean I sure have tested it on chrome, Firefox, edge and chrome on Android (don’t think you need to try anything else on Android since most are basically chrome with your history and bookmarks swapped out anyways. As far as safari goes I just hoped for the best and was gonna fix it if it does not work for someone. If everything was expected to work these days I would not have bothered and found multiple browser dependent bugs on the site.

1 Like

With things like a date element, that shouldn’t really be used, you should implement your own solution because it isn’t yet reliable. Same applies to anything newer then ES5 with JavaScript, like I would love to use the nice and new JS syntaxes and features, but with all new front end tools & tech, it just doesn’t work quite yet. An easy solution for a date picker would be to use something like jQuery UI.

https://jqueryui.com/datepicker/

CSS media queries, and the easiest approach is a single column design, which works great for things like blog posts, forums, etc, it keeps things clean and minimal too. With design, sometimes less is more! :wink:

Very easy and reliable! :+1:

I’ll strongly agree with that one! Who uses anything but chrome on Android? … Hipsters? …


With cross browser stuff, it’s usually due to people rushing and using the latest and greatest tech, as I personally have to develop applications that actually support IE8+, at least vast majority of the time I do, trust me when I say this. I mean we can’t use any cool toys like React, Angular, etc… Often it’s easier to develop our own solutions than find something that will work nicely with older browsers…

Often when supporting legacy browsers, it’s never a bad idea to copy jQuery or just use a really old version of jQuery, but personally I tend to do most things DIY. Basically jQuery wraps everything in an object and has a bunch of methods attached to ‘z’ object. You may be wondering:

Why would you do that?

Good question, in IE8 the indexOf method doesn’t even work with an array, a simple poly-fill is to create a custom object or you can do some very simple poly-fill like so:

if (Array.indexOf === undefined) {
  Array.prototype.indexOf = function (arg) {
    var self = this;
    for (var i = 0, s = self.length; i < s; i ++) {
      if (self[i] == arg) {
        return i;
      }
    }
    return -1;
  };
}

Edit:
I don’t know why I was thinking of something totally different when I originally wrote the poly-fill, I think I was thinking of a contains method or something, lol.

Edit no.2:
I’m just gonna put this here… http://bettermotherfuckingwebsite.com/

Yeah the bleeding edge thing is probably a good point. I also had used the newest version of bootstrap + jquevy a available of the time of making. So I might not have had some issues if I was not doing that. I didn’t use beta versions only the stable once though. Though IE8 support is taking it a bit overboard unless it’s an internal company site. Then yeah I get it. Nobody cares enough to make it look like much or test it with anything but IE.

Now I wonder have you just bought a domain and made that site? XD

I work in the UK, and as it turns out a lot of government and financial bodies whom are our clients actually use IE8. Keep in mind places like this aren’t keen on frequent upgrades as it’s not financially in their best interest, sure it makes my life annoying, but I’m pretty sure they’re not bothered by that.

No I have not… I don’t own that domain, that website has been around for quite some time, I’m pretty sure it’s a few years old now… It’s funny how it genuinely does raise a few good points though… But yes, I do swear that motherfucking much…


General rule of thumb for my own projects is to say screw anything older than IE10. If it works, cool, but I don’t go out of my way to make it work anymore, life’s too short and some neat features just don’t work with older versions, an example being this little experiment I’ve been playing around with the past few days:

Keep in mind, if you ever use multi threading on the front end, remember the main execution thread is a thread of it’s own, hence why you can’t access things that are on the main execution thread within a background thread. So it’s kinda like a process in that respect, to pass values to and from you need to invoke some method(s) that are attached to those threads.

To emphasise my point, you can’t even handle DOM elements in a background thread…

No problem, at least you can mine bitcoin in the background with it. :blush:

I mean you do seem like you have more experience than I do in webdevelopement. So I feel like your advice should be valued higher than mine. (in this current point in time at least :P)

My reasoning (for the Wordpress part) was just kinda that with Wordpress you can build good looking sites without being a genius at web development (point and click gets you places). And the emphasis here is on a somewhat stylish website (though please don’t overdo it with tacky slideshows…). As that’s imo one of the most important thing when you’re basically building advertisement. Apart from readability and giving a good concise idea about what is it your company provides (witch surely even more important). Security is second or rather third to that since you don’t have any data to protect there.

And that is pretty much what WordPress was made for! Hence why it doesn’t come with good security or even good performance when compared to a reasonable and custom built website. But you can’t expect something that ‘comes in a box’ to be as good as something that has been tailored specifically for you/a client.


I take it that you’re more front end oriented than back end? Well I’m full stack, I like to make sure both the front end and the back end are loaded with security, reliability and performance above everything else. The pretty stuff, I’ll leave that to the designers and front end, sure I can do basics, but I’m no pro with creating a beautiful design to be honest, like my own website which is nothing special what so ever, that’s my kinda level(s) with design to be honest… :stuck_out_tongue:


Edit

I don’t think JavaScript in the web browser would be very good for anything like that… I’m not gonna lie to you, I mean go ahead and try it out, but I doubt that would be worth even trying… :stuck_out_tongue:

That’s one of the main objectives of any CMS, along with managing content more easily, vs custom websites. Seems like Wordpress is used as a synonym for CMS. But there are many others which may be more secure, modern etc, partly by starting from scratch and defining priorities.

Eg. Ghost, started by a former Wordpress developer, with an unapologetic focus on blogs.

I like the simplicity of no databases with Grav, growing community and documentation.

BoltCMS is also neat, has a structure some prefer, and has decent documentation.

OctoberCMS has a nice interface.

Most provide templates to make it easy to start.

And there are many, many more CMSs. Main thing is to figure out your requirements and then pick a suitable tool.

1 Like

YES! I totally forgot about Grav! :smiley:

Did you also forget having quoted me on it earlier in this thread? :wink: