I'm making a website for a rather old company and one of the owners requested a blog page. I'm not exactly sure how to go about this as the only solid pieces I could implement were a live twitter feed and an imbedded blogspot in an iframe. Without using php is there any way I can make a blog that you can add new articles to and leave comments on?
Sure you can do exactly the same thing using java, c# or even cgi-perl. No need for php at all :)
If you want to avoid writing any code just give them a wordpress instance running on the same server and set up some apache rewrite rules or put it on a different subdomain & v-host to send them that way.
Are you saying it can only use HTML5/CSS/JS? I guess there is probably something for node.js that could take care of the server side, but generally those are client side languages and the server side is taken care of with CGI programs, a la PHP or Python or what have you.
If you can give some more details you might get better guidance.
Ahhhh...... FreqLabs you made me see what is probably going on here.
@Revolt: Is the underlying problem that you do not have any control over the server the website is going to be running on, only the client side html/css/js? If that is the case you are going to have some issues because you are going to need somewhere to store the blog posts and that will have to be done on a server somewhere.
Partly my problem. They say they are hosting their current website somewhere (very vague) and that I just need to build them a website, so I'm doing everything client-side as to prevent any issues. HTML/CSS/JS is the only way I can assuredly control the outcome. If there is anything js-wise that i can change that'd be great.
tl;dr - Idk how they're hosting it/if i'll have server control
If you don’t have server side access, you will not be able to persist the blog entries on the back end.
I guess you could use HTML5 local storage to store a user’s blog entries locally. HTML5 local storage or web storage as it is sometimes called stores data as a set of name value pairs. So, you could certainly make a key value for each blog entry and store the key and blog entry locally.
I would personally consider using local storage for this to be a hack, but if you have no other options this may work for you. And there are some limitations.
Each website can store a maximum of 5 Megabytes of data in local storage. Only browsers that support HTML5 will support local storage, so if you have users with old browsers, this will not work. And this is browser and location based. So if a user uses two different browsers on the same machine, each browser can only see blog entries that it made. And if a user access’s the website from another location, blog entries made at a different location would not be visible.
They say they are hosting their current website somewhere (very vague)
ask for server control or walk away. If its just a simple blog I would do wordpress or concrete5 as a back-end cms
just be careful with the php versions
Well I contacted the owner and I asked how they're hosting it and if I'll have server-side access so I'll update you guys later, but I've been looking into using aspx files to make it. Any info on that?
Looks promising, haven't done anything but download their source code so I'll see what happens.
im no expert but i believe aspx needs to be hosted on a Microsoft server or at some types of aspx files need it to run or maybe its just .net - like a linux server isnt allowed to run them server side without a vm but for small forms you can run them client side
- maybe im just confused
Generally speaking if you decide to go with .NET, you will be bound to Microsoft. You will have to deploy your WebApp to an IIS server on a Windows box. If you are 100% sold on a Windows solution, then have at it. However, with that said, you can use Mono and deploy .NET applications on Linux. And instead of IIS you would host your WebApp on Apache.
For personal projects, research, and “Science Experiments,” Mono is a good option and it works well. But if you are building an application for a business, I would not recommend using it. Mono is not sanctioned by Microsoft and at any point in time, Microsoft can pull the rug out from under Mono claiming copyright infringement. The whole purpose of .NET is to sell Windows licenses, not to create a cross platform application building tool.
If you do get server side control go with a PHP, Python, or what I always recommend, a Java solution.
Not very useful if anyone outside of the person writing that blog is supposed to be able to read it.
Alright thanks for the info! Looks like im back to php =S
From the original question, it can be assumed that this would be for some sort of personal journal, not really a blog in the traditional sense. Since without server side access, the ability to persist entries to a database is not possible, leaving local storage and single user consumption the only choice.
That's exactly what I would want but how can I accomplish that without changing the code every time I want a new post?
I did this is about an hour or so, so it is quick and dirty.
But like I mentioned earlier this has limited use. Only one user, at one location, using the same browser can view and create blog entries. Meaning a user who logs onto his computer, opens FireFox, navigates to your website’s blog page, can see all blog entries he made using FireFox and he can also add additional blog entries to the existing ones. However, if the user changes computers or uses Chrome or Safari to navigate to your website’s blog page, he will not be able to see the blog entries he created using FireFox.
If your webapp stores other values in localStorage, you will have to figure out a filtering/storage mechanism to determine which entries in localStorage are blog entries and which are not.
Ok well it's been a while but here's the update.
I have access to the server! =D
All systems are a go and the website is online - albeit as a show (I'm still working on some pages).
I just poked through the code for that, very interesting little app. Not sure how scaleable it would be, and you need a user that knows the markdown for it. I may have to try it out though and play with it
What I understand from your entry is that you need a blog aware static site generator
Now there are a plethora of options to choose from based on your preferences and all the solutions are comparatively similar when it comes to performance and delivery. The only difference they have are the programming languages they are built on and the workflow required to post a new article through them.
Although I use Python on a daily basis, I will take Ruby over Python any day of the week for blogging and web-development works. WHY? Because Ruby is THE language for current gen web framework. We, electrical engineers, often day that Endianness do not matter when it comes to serial processing. But it does provide a substantial value (peace of mind maybe) to stick to the Big-Endian compiler when developing for the web.
My recommendation is go with Jekyll. Its simple and easy to learn. The whole process of installing the required software to actually start blogging takes less than 15 minutes. And there are a plethora of free themes floating around. Here is one of the themes I created for Jekyll. http://jekyllthemes.org/themes/hmfaysal-notepad-theme/
Check out the other great themes in that website by some great designers ;)