How To Create These Coding Platforms Like Codepen
# March 8, 2013 at 3:32 am
The problem isn’t to develop something that works like CodePen; it’s actually quite easy to inject some styles in iframes and such. The problem is to develop an efficient one:
– saving all the gists
– keeping high performances even when using multiple iframes
– prevent injection and malicious hacks
– make real live preview with acceptable performance
– handle a lot of options (libraries, preprocessors, social, etc.)
CodePen is built on Ruby on Rails if no mistake, with a fairly huge amount of Ajax. You’ll be able to do so with PHP but it will probably be far less robust. Plus, you’d like to do it with OOPHP, not procedural.
Now let me ask you this: why do you want to do so?
If it’s for the challenge, then go ahead but don’t expect to have an amazing coding platform in the end.
If it’s because you want to embed something like that in an app or something, you might want to embed an existing one. Like CodePen.# March 9, 2013 at 2:54 am
It’s not basically for the challenge. I intend to start a web development school in my country and I want my students to be doing practice there. And when they have a problem, they can easily give any of the tutors the link (like codepen link) to view the codes and point out the errors. I dont want to use codepen, dabblet or any other. I want the school to have a customized one and also a forum where the students can interact and brainstorm.
So u mean for mean to build a robust one like codepen, I will need to master php and ruby?# March 9, 2013 at 3:45 am
I can understand why you wouldn’t want to use codepen and the like (although their professor view seems perfect for you, students work should be visible to teachers but not to other students), but you should understand it’s a lot of work. From the about page I can see 3 people worked on codepen, one dedicated front-end developer, one dedicated back-end developer and one jack of all trades. That’s probably aiming too high for a one-man project.
That said something far less complex would be enough to fit your needs and I wish you good luck. You don’t need PHP and Ruby, it’s one or the other. I would however look into a framework like Zend Framework 2 (there are tons of others, probably more lightweight. ZF2 needs more work to make it fast. I don’t know anything about Ruby but I think Ruby on Rails is a framework…? )
You should know what you’re getting yourself into, it’s a lot work and time that you could have better spend elsewhere. I’d reconsider using some existing code paste bin.# March 9, 2013 at 5:53 am
If you know what you’re doing, I think it’s possible yes.
You should probably start by listing all the features your end product has to handle, and think of the way you are going to store the data (language, table architecture, etc).
Let me just say it one more time, then I let it go: I **really** think you should use an existing one, even if I totally understand why you don’t want to. Don’t reinvent the wheel, and all this stuff.# April 17, 2013 at 11:17 am
If you still want to make you own code editor:
You must be logged in to reply to this topic.