Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Developing a CMS in node.js

Newbie Spellweaver
Joined
Jul 20, 2012
Messages
7
Reaction score
2
Greetings,

First a little bit about myself. I'm a webdeveloper from the Netherlands and I mainly work with the MEAN stack. I've recently started playing around with Habbo retro stuff again (after quite some time) only to find out loads of content management systems are still written in PHP. (the older versions even with deprecated stuff)

I'd like to start developing one in node.js but I'm a bit lost as to where I can get some info on how to create a working Habbo client 'from scratch'. What I mean by that is that I'd like to be able to create some kind of authentication system myself, and use it's data to login to a Habbo client with said data.

I mean I could search my way through something like RevCMS but my development environment currently doesn't support the older versions of PHP and I haven't had the time yet to allow for 'backward compatibility'. I'd also like to discuss whether there would be any obvious disadvantages of using node.js instead of the traditional PHP back-end that usually is associated with Habbo that I might be overlooking, which is why I'm also creating this thread.

Kind regards.

[Moved from: Retro Habbo Chat to: Coders' Paradise]
 
Last edited:
Newbie Spellweaver
Joined
Oct 17, 2008
Messages
21
Reaction score
87
Define why you want to make it on Node.JS?
 
Junior Spellweaver
Joined
Aug 21, 2010
Messages
147
Reaction score
12
Personally I would use a full PHP backend.

I would also recommend not to take inspiration from Rev as its really an over-praised CMS and as I'm sure you will be aware also has a very nooby image to it. There are infact very few Habbo retro CMS' of which I would recommend as they generally either have notable exploits or bad practices in their syntax.
 
Joined
May 23, 2008
Messages
1,071
Reaction score
574
Heya Soundwave. I'm not all that familiar with Habbo, but I work professionally with Node.

There are a few detriments that you'll notice with Node.

There's a lot more boilerplate. PHP gives you reasonably straight forward technologies. You have the Apache (or nginx) webserver that you don't really have to worry about. You don't have to worry about server-side routing - it just works.
If you go with Node, you can do everything PHP can do, but you will be setting up your own web server. You'll be setting up whichever build tools you want to go with. There's a non-trivial amount of things to do before you can even start working on the CMS itself.

Javascript is overly forgiving... to the point where it's unforgiving. It's more lenient, allowing you to do some crazy cool things, while also making it much easier to introduce bugs into your code. Bugs that your code may never even warn you about.

Javascript & Node's extremely popular right now, and Javascript developers are always innovating. Too much. Keeping up with all the new javascript frameworks and libraries is impossible. Angular 1, Aurelia, Angular 2, Ember, React, Polymer, Backbone, Meteor, Flux, Redux, Vue, Mithril, Express, Koa, Hapi, Grunt, Gulp, Browserify, Webpack, Sails... the language is intensely crowded and hyper-evolving. There are so many different ways to do things - Be careful.

Really, pick the tools you want to use, don't spend too much time on that. Pick libraries that look like they'll get the job done, that look like they'll be fun to learn, and that have a sizable community.

Now that you've heard all that, are you sure you want to use Node? Really, you can pick a few libraries and start making something pretty neat. It depends how serious you want to be with it.

Something to consider is are you sure you want to deviate from the language of the game itself? PHP. PHP isn't evil. That being said, there are many popular, crappy projects in PHP. Horrible, scary, terrible projects, frameworks, libraries, and so on. Heard of Wordpress? Most popular CMS in the world, counts for almost 20% of all websites in the world - written in PHP. And it's coded poorly. Very poorly. In many countries, you can make a living off fixing people's hacked Wordpress sites. (Protip: Use a randomly generated password different from everything else you use. Rename the wp-admin directory. Restrict it to certain IPs if possible. Don't tell WP admins, freelancers need some way to make a quick $300+, right?)

Now then, have you ever heard of Laravel? Great, great, great PHP framework. Use it. Symfony's pretty cool too. You can write good code in PHP. As good as any other web application in Ruby, Python, Javascript, or Java. Start with a good framework. Just remember to question everything you read and see. Especially if it's an article related to PHP.

That being said, do use a more modern version of PHP. I don't disagree with you being weary of code that only runs on older PHP versions.

Habbo communicates with RevCMS using some sort of API, right? At some level, I'm sure. That's just a call over the internet; you can do that with any language. If you really want to pick up Node, go for it. Personally, I'd recommend starting with as the web server, and use node's to make any API calls you need to make. Decide how server/client sided you want your app to be, and roll with it. Angular 1 and React are both quite popular and viable nowadays, but they both have a learning curve.

In regards to creating your own authentication system, please be careful. Use popular third party libraries as much as possible. Don't implement security yourself. That's how bad things happen. No matter how good you think you are, just use what's already out there. There are dozens of incredibly smart minds, PHDs and what-not, that do security professionally so the rest of us don't have to (because if we tried, we'd get hacked a lot faster than if we followed the experts' recommendations).

This post may be a bit more than you bargained for haha, but I hope it helps you make a decision. Let us know if you have any other questions :).
 
Elite Diviner
Joined
Aug 15, 2008
Messages
489
Reaction score
43
NodeJS is really interesting. I personally started working on NodeJS projects this year, so I have too little knowledge to give any advice as in what to use and what not. But what I can say is that I've actually worked on a couple website projects, one of which we created a content management site for a clothing store which had the administrator ability of adding new items, editing them and deleting. The site was created using React Redux and we used a as a skeleton for the project. I must say that coming from a PHP background to coding stuff entirely on JavaScript was really overwhelming at first, but once I got the hang of things I really started to like it. The thing I also enjoyed very much about React Redux was that whichever change you make into the code, it's being refreshed to the site and it displays all the errors on the screen, without the need to go to the console. This means less spamming F5 to see the change.

As in for database, we used PostgreSQL with some fancy package for writing the queries, which name I unfortunately have forgotten.

If I remember correctly, Habbo is a flash game? Or is it a HTML5 game these days? I haven't played that game for at least 10 years. But perhaps consider React Redux as one option.
 
Watching from above
Legend
Joined
Apr 9, 2004
Messages
3,828
Reaction score
752
It sounds like you guys picked on totally the wrong question there. He's already most comfortable with Node.js stacks and his question was about the Habbo side and creating servers/clients from scratch.
 
◝(⁰▿⁰)◜Smile◝ (⁰▿⁰)◜
Developer
Joined
May 29, 2007
Messages
2,167
Reaction score
898
The Habbo client is a flash based game, you just need to add a SSO key and server information inside the flash vars if I'm correct. I'm over simplifying. The best thing you could do is to look at existing projects.
 
Joined
Jun 8, 2007
Messages
1,985
Reaction score
490
The one time I see a thread about node.js, and I have nothing to say because TimeBomb nailed it. I did write a quick(ish) tutorial on getting started using a basic framework/pattern to help make medium-to-large scale projects in node.js manageable. Well that's my answer to your side-question, as to how to link your habbo client to your server or whatever, CodeDragon pointed out that you should look at existing projects. I agree.

Yeah, I guess I just stuck my nose into this thread to give you a link to my tutorial, lol. Great job everyone else who posted!
 
Newbie Spellweaver
Joined
Jul 20, 2012
Messages
7
Reaction score
2
Thanks everyone for taking the time to reply to my post. (especially @TimeBomb) The reason I want to use Node.js is because I've been using Node.js on a daily basis for work and other personal projects. Although I appreciate you guys' enthusiasm and elaborate replies, @Negata is right. My original intent was to get some directions regarding the creation of a Habbo client specifically (as that is something I haven't done before) and to discuss whether Node.js would pose some problems with regard to habbo. I too work professionally with Node.js, so although I really appreciate the elaborate explaination of Node.js in a nutshell and although I agree with almost everything that was said, it wasn't really the goal of this thread.

To be honest I didn't quite get why my thread was moved here, because all of my questions were aimed towards habbo specifically. So my apologies for the confusion this may have created. I'll take a look at some existing Habbo projects to get a sense of how Habbo clients work, but I was hoping someone could send me a link to a tutorial that explains it well, since most tutorials seem to have been written by 12 year olds.:closedeyes:

NodeJS is really interesting. I personally started working on NodeJS projects this year, so I have too little knowledge to give any advice as in what to use and what not. But what I can say is that I've actually worked on a couple website projects, one of which we created a content management site for a clothing store which had the administrator ability of adding new items, editing them and deleting. The site was created using React Redux and we used a as a skeleton for the project. I must say that coming from a PHP background to coding stuff entirely on JavaScript was really overwhelming at first, but once I got the hang of things I really started to like it. The thing I also enjoyed very much about React Redux was that whichever change you make into the code, it's being refreshed to the site and it displays all the errors on the screen, without the need to go to the console. This means less spamming F5 to see the change.

As in for database, we used PostgreSQL with some fancy package for writing the queries, which name I unfortunately have forgotten.

If I remember correctly, Habbo is a flash game? Or is it a HTML5 game these days? I haven't played that game for at least 10 years. But perhaps consider React Redux as one option.
I think it's awesome that you know how to use React + Redux, I myself have made a couple of react web applications using MobX. You should check it out, it really uncomplicates how state is managed as opposed to how redux & flux manage state.:): MobX is the reason I gave React a shot.
 
Last edited:
Initiate Mage
Joined
Dec 3, 2016
Messages
1
Reaction score
0
What I can't get is why do you creating it from scratch?
 
Newbie Spellweaver
Joined
Jul 20, 2012
Messages
7
Reaction score
2
What I can't get is why do you creating it from scratch?
Like I've said before I don't like the PHP frameworks that are currently out there for Habbo. I don't mean building 'the entire habbo game' from scratch in flash, webgl or html5 canvas and whatnot, but rather building the CMS used around the client from scratch using a platform like Node.js.
 
Skilled Illusionist
Joined
Oct 29, 2012
Messages
311
Reaction score
25
how i can put online a cms site using node? it is compatible with appserver ? or i'm talking shenanigans?
 
Newbie Spellweaver
Joined
Jul 20, 2012
Messages
7
Reaction score
2
how i can put online a cms site using node? it is compatible with appserver ? or i'm talking shenanigans?

I'm not all too familiar with appserver but if it runs something like Apache similar to how XAMPP does it, then no. Basically Node.js is the webserver if you're using something like within Node. Although you could probably come up with a setup that would allow for both, but that's not what I'd recommend you do.

I got your private message by the way, I'll look into it but I'm currently a bit busy with work related stuff so I'll get back to you asap.:):
 
Skilled Illusionist
Joined
Oct 29, 2012
Messages
311
Reaction score
25
I'm not all too familiar with appserver but if it runs something like Apache similar to how XAMPP does it, then no. Basically Node.js is the webserver if you're using something like within Node. Although you could probably come up with a setup that would allow for both, but that's not what I'd recommend you do.

I got your private message by the way, I'll look into it but I'm currently a bit busy with work related stuff so I'll get back to you asap.:):

Yes, appserv runs an apache similar to xampp. A node server is totally different from that, so I have no idea how to use it hahaha
 
Back
Top