Ask Slashdot: Has the Time Passed For Coding Website from Scratch?
First time accepted submitter thomawack writes As a designer I always do webdesign from scratch and put them into CMSMS. Frameworks are too complicated to work into, their code is usually bloated and adaptable online solutions are/were limited in options. I know my way around html/css, but I am not a programmer. My problem is, always starting from scratch has become too expensive for most customers. I see more and more online adaptive solutions that seem to be more flexible, but I am a bit overwhelmed because there are so many solutions around. Is there something you can recommend?
...and write a generator, to your own specification.
i) Frameworks are too complicated - but poster admits he is not a programmer (hence the framework difficulty) and unqualified to judge their complexity.
ii) Complains about things being too expensive to make (again, how is he making sites form scratch without being a programmer? I think he must at least have some coding skills, mor than he credits himself with)
The answer: Frameworks are there to reduce time to market; if he's refusing to use modern tools and frameworks, much is explained.
(I'm not suggesting frameworks are good in general; but a good framework is good in its niche; you want to put up a blog.. it takes 10 minutes using an existing blogging framework; you want to write it yourself, order of magnitude more time.)
So .. this is his problem, not a systemic problem?
-black
Yeah, the time for coding them from scratch probably passed about 7-8 years ago. Can you still code them from scratch today? Yes, technically you can, but at most employers you would be way to slow on the productivity side. As a web developer and web hosting guy for a large Fortune 500 company, I can tell you that marketers expect to be able to get a very nice site with lots of bells and whistles up within just a few days anymore, with all kinds of custom features that allow them to edit the page without a developer. To meet that kind of demand, you can't code from scratch. You really need to use a CMS tool to handle the editing/admin functionality, and then some sort of RAD framework, whether it be .Net MVC, JQuery, AngularJS, etc (or multiple of these frameworks) to quickly set up the rest of your custom functionality. Otherwise they'll just go to someone else who can do it faster so that they can meet their ever shrinking time to market campaign goals.
This, by the way, is one of the reasons I'm no longer a developer. I personally enjoyed the nitty gritty of coding from scratch, and got bored quickly from just doing "information plumbing", where you pull from one or two databases, get to do a tiny bit of code but mostly the framework does everything interesting. I know lots of people prefer that because they don't want to deal with low level stuff, but that's not my bag.
Beware of bugs in the above code; I have only proved it correct, not tried it.
My advice is to become familiar with HTML/CSS/JS/PHP/MySQL or whatever and build your own stripped down frameworks, basic stuff like a CMS and frontend scaffolding. Then you can adapt that as need be, add bits on or take them away, change it while keeping costs down (since you've already built the basics) and maintain a minimal profile.
It's not that hard once you start laying the foundations.
Here's my website. I invite anybody to look at the source code, and compare it against your run-of-the-mill WordPress website.
Here are the 249 lines of Python code that I use to render it. In addition to the source code, there are x6 template files (each less than 1KB large), and x1 CSS file (less than 2KB).
What the parent post says, rings true to me.
No need for Django, no need for frameworks, no need for deployment systems beyond DropBox.
"The long term savings in terms of enabling staff to go in and edit stuff live has saved a fortune." -- This especially rings true to me.
"I tried Django and the sheer volume of stuff I needed to do to get the same functionality up was huge and then the staff couldn't edit it because for all that's claimed for Django, there's a big model you have to get in you head before you can start meddling with it, and that means web professionals who cost a lot of money." -- And this too. (And I'm a professional Django developer, by day.)
I heard recently that there are people working on an "Indie Web" concept; I'm all in favor.
Your problem is you've mixed design with the site HTML.
Developers are notoriously bad at design work. Being a developer, I can tell you that we are not usually great at the artsy aspects it takes to design good sites.
However, if you give us a design, we can transform it (using our preferred frameworks) into a working site.
Somewhere along the way you got the idea that you can do it all, but that's your problem. You can't (and shouldn't) be coding or generating all of the pages. If your expertise is design, then have at it. But after your design is done, hand it over to a developer for implementation.
Just as I don't want to see a developer designing, I don't want to see a designer developing.
If your page isn't fully loaded in less than 2 seconds over a real world network without using cache, potential clients have will leave before the 1st page load.
If you can write pages that load fast, keep doing the custom work. If your pages are slow, fix it or fix your technique.
Anyone else go through this?
Nope. Throwing faster hardware at a problem is much cheaper than having a team of developers spend weeks optimizing a framework or making a new one.
Karma: Terrifying (mostly affected by atrocities you've committed)
Now I have a repertoire of modules I can use to put together a site for a given situation.
Twinstiq, game news
Hmm, this sounds like a false dichotomy.
The problem could be formulated like:
"I know how to use HTML and CSS and javascript too, but:
- translating my design to a complex CMS is time consuming, new versions might impose a lot of updating, and I must keep ahead of the plug ins that offer the functionality my site needs. Js widgets also need more work or attention to be succesfully integrated.
- static site doesn't cut it because I need dynamic features like user logins or have data that is better organized in a DB
- roll-your-own dynamic site with scripts requires a lot of attention to security and vulnerabilities"
An answer could be: use a lightweight framework that does not impose many restrictions on the structure. Radiant for rails is the classic one, but I prefer wolfcms because it is a bit easier to deploy and has no domain specific language for templating, you embed PHP. Radiant needs an extension to do that.
In such frameworks you could start with your hand crafted html and:
- Put your hand made html pages in the CMS tree. The advantage is that you can login to the server to edit and upload content without much fuss (watch out for upload limits in php.ini though)
- Separate design (using layouts) from content, so that less repetition and more consistency is achieved.
- Automate navigation so adding a page to the tree updates the links and the site map.
- Use either the DB or the page parts (they are like db fields, the page is like a record) to further separate content from presentation, so that even unskilled people can add content.
- Refactor functionality in plugins so they get reusable (if you're getting a pro)
If you're going to need app-like functionality, though, a full stack framework like web2py rails or the thousand others is where you'll likely end up, eventually.
---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
Wordpress is a goddamn mess.
The average person who uses wordpress, doesn't update anything, and there are theme/plugin developers who push needless feature creep into their updates, and sometimes completely obliterate a clients site because the update conflicts with other shit plugins they were told they needed in the name of security (eg Wordfence) or Mobile compatibilty (Jetpack)
Here's the dealy-o...
If you want a site to look a specific way, create a mock-up in Photoshop, Illustrator, Flash, I don't care what you use, but then send that to someone who knows how to code HTML from scratch. That will get you a static page, and you can test how slow or fast it is. Then you ask someone to wrap the CMS around the theme, not try to hammer the theme into a CMS. Wordpress is often too much for the average person, and is touted by cheap webhosts as a way to get a "Business card" website up. You can't run a serious website on Wordpress AND use a cheap host. Cheap hosts do not install the necessary opcode caches that are required to make the site not run slow and load-spike the server (Dreamhost will just nuke your site if it overloads... because they don't install any php opcode cache.)
What PHP was designed for, was mixing code and PHP together, so it would be compiled once and run many times. But CMS's use PHP's OOP features to make it a hell of a lot more complicated.
My "hand tuned" CMS takes less than 1MB of RAM to run, and less than 1MB of opcode cache space, and performs 100x better than Wordpress does. My static-page generating CMS that uses Perl, performs even better than any PHP cms, but because it has to generate static files, it's not a good fit for readership engagement (short of disqus or intensedebate on the pages.)
And while I'm complaining about Wordpress, I'll mention that I've used other CMS software before, and I would turn my nose up at all CMS solutions unless they were being rolled out onto a large site that has it's own maintenance crew. Drupal or Joomla should only be used if you are using the CMS for absolutely everything, and everything on the server goes through it. Wordpress likewise should be used that way too, but it's difficult to use that way because it contains no security partitions what-so-ever, so one bad apple will spoil the entire system. Hence you end up with a server with 20 independant installs of wordpress, where one of those sites can make the server fall over because the idiot insists on not running the caching plugins because the readership engagement is too fast.