3 Replies - 12528 Views - Last Post: 06 September 2011 - 09:47 AM

#1 xCraftyx  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 11
  • View blog
  • Posts: 258
  • Joined: 13-September 08

Using Django and HTML5 for a website

Posted 05 September 2011 - 10:04 PM

Hey, so I've been asked to contribute significantly to a website as part of a development team. Let me start off by saying that I'm far from new to programming, but I've mostly been geared towards desktop and mobile (iPhone) development for the three years or so I've been doing this. Like everybody else I whipped up that web page in Programming 1 in high school using HTML and CSS, but obviously in this day and age it needs to be Web 2.0-y.

I'll most likely be responsible for the back end of the website, for which I'm planning on using either Java or Python. I'm very comfortable with both, so that's not an issue. I'm leaning towards Python because I've heard great things about Django and scripting just seems to fit better with websites in my head than a statically typed and compiled language like Java.

I guess my actual question is: Is it practical to design the back end and core of a website in Django and then use HTML5 as the front end? I've been told to insist on HTML5 by a couple of friends I have who have already graduated, but I haven't been able to find any articles on using HTML5 with Django instead of the build in template language. I'm woefully ignorant on the subject and I'd really like to change that, so any information you can offer is greatly appreciated. I'd also be happy to see opinions as to why I should use, say, Java with Play! or something instead.

Wasn't sure if this should be in Python or not, since it's Python related but primarily a website architecture question. I won't be offended it's moved :)

Is This A Good Question/Topic? 0
  • +

Replies To: Using Django and HTML5 for a website

#2 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1003
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: Using Django and HTML5 for a website

Posted 06 September 2011 - 12:07 AM

I had to maintain a website written in Django and I can tell you that what it does is pretty much magic.

So from saying that, take from it what you will. It does a lot of the crap for you, and thus takes away quite a bit of control. On the flip side, however, it generally makes things easier to maintain.

Now as far as I'm aware Python was never built for the web, despite Django coming along.

I would have to suggest that you use PHP to be honest. I know that you may not be used to it or have any experience with it, but if you know Java it's going to be pretty easy to pick up. Now the reasons for me saying this are not because I :wub: PHP (We have a love/hate relationship 99% of the time), but because it is a language that was specifically built for the web, is fast, proven, etc. etc. One thing I can tell you about Django is that it is not fast.

Aside from that, you'll have a lot of help from DIC alone with PHP, our community particularly in the PHP forum is massive, and aside from that you've got a tonne of tutorials around the web as it's extremely popular for obvious reasons.




When it comes to HTML5... It's a bit more simple.

Do you want your website to work flawlessly across all browsers (well, IE <8)? If so - Don't use HTML5.

If you want your site to only work in modern browsers then I say go for it.

Of course, there are a lot of hacks to get HTML5 working in older browsers, such as simple CSS tricks such as forcing header, footer etc elements to be display: block thus emulating the fact that they work. You're free to use these, but if you're wanting to use new controls such as <input type="range" .. /> etc then forget about it (unless you again use jQuery or another library to replace these out..). It can get quite messy, basically.
Was This Post Helpful? 1
  • +
  • -

#3 xCraftyx  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 11
  • View blog
  • Posts: 258
  • Joined: 13-September 08

Re: Using Django and HTML5 for a website

Posted 06 September 2011 - 09:23 AM

Yeeah I was wondering if speed would be a problem with Django since it's layers of abstractions built in an already abstract interpreted language. I'd really like to be able to play with HTML5 somewhere it matters but as I mentioned I most likely won't be developing the front end, so I'll just have to deal.

What about Java?
Was This Post Helpful? 0
  • +
  • -

#4 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1003
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: Using Django and HTML5 for a website

Posted 06 September 2011 - 09:47 AM

Java for the web as a server side language? :hang:

(awaits beating :D)

This post has been edited by RudiVisser: 06 September 2011 - 09:55 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1