Hacker News new | comments | show | ask | jobs | submit login
Django with Visual Studio (windowsazure.com)
104 points by juice13 1694 days ago | hide | past | web | 73 comments | favorite



What's so perverse about that? Everybody I know who's tried it claims that VS with PTVS (http://pytools.codeplex.com/) is an excellent python dev environment.

edit: original title was editorialized to to claim that doing this was a perversion


To each his own. I develop on windows, but am not a fan of VS. Tried, it didn't work out.


Are you going to deploy Django on Windows? You would not be wise to do so. So why choose such a profoundly different development environment?


I have successfully deployed Django on Windows[1] systems for critical intranet apps and have at least two more Django on Windows projects in the pipes.

No it is not an ideal platform but sometimes factors outside your control make it the best/only option if you want to use Django/Python. I work in a largeish very Microsoft dependent hospital and getting infrastructure support (hardware, database backups etc) from the IT department requires a Microsoft stack.

Being able to deploy a Django project on either Linux or Windows systems from a single code base is a pretty big advantage for me.

[1] Windows Server 2008R2 / MSSQL


Deploying Django to Windows is exactly what this article is demonstrating. Care to explain why we would not be wise to do so?


Kind of taking some liberties with the definition of the world 'profoundly', aren't you?

If someone works quicker and better in a given dev environment, power to 'em.


I don't think "profoundly different" is an overstatement when comparing Windows to anything Linuxy.

If someone works quite a bit better in Windows, OK... but I think it's a far better idea to mirror your deployment environment as closely as possible, not just in staging/testing, but on your development machine as well.

That's not always practical, but working in an environment you should know doesn't even vaguely approximate any deployment scenario means you will miss any platform-specific issue that would have been obvious if you were staying closer to your deployment platform. At best it will be found during testing/staging or by another dev who's using a more appropriate environment, but that's several extra steps and extra time that wouldn't have otherwise been necessary.


I'd want to add that working in a windows for dev, linux for deploy environment will eventually make you constrain yourself to using libraries which work on both platforms.


Which, unfortunately, is a big gap in Python. We had this developer using Windows who wouldn't want to install Visual Studio. So we tried finding binaries for stuff like LXML, and the newest versions we could find where a good two or three years old. Eventually we hit a wall with one of the packages (I can't recall exactly which one, but one related to cryptography I think.) We couldn't find a binary, and installing Visual Studio + configuring to work from the command line, etc. took way more time than setting up VirtualBox with an Ubuntu machine.

A massive waste of time.


I agree that the whole situation with C based python packages on Windows is really quite broken, but until they get around to actually fixing the situation every python programmer who has to touch windows should have http://www.lfd.uci.edu/~gohlke/pythonlibs/ bookmarked.


Even on OS X, it's a total waste of time to not use a VirtualBox that mimics your production machine.


> Are you going to deploy Django on Windows? You would not be wise to do so.

Is there something about Python on Windows that isn't stable or are there specific package/modules that Django requires that have issues?


I think the "windows" part is the "not stable" one :)

(just a joke, but cannot resist)


Why not? It works perfectly well. I've also in the past run PHP sites on Windows (behind both Apache and IIS) for real world applications too. There's too much hivemind about these things. If it works for you, then it works.


You could mount a remote Linux box over SSH using something like ExpanDrive and edit in VS, right? (analogous to sshfs) Not sure why you'd want to do so, but I guess VS does have effective autocomplete.


The true perversion is that all the screen shots have the Solution Explorer docked to the righthand side of the window. It's hard to describe how fundamentally wrong that feels.


And the beauty of Visual Studio's interface is that it is completely customizable. If you want the Solution Explorer on the left side, all you have to do is click the top of the window, and drag it over to where you want it; it'll snap right into place.


You know, I've been thinking about this lately. I've noticed my eyes 'travel' quite a bit more with the explorer on the right. You normally scan text starting on the left, so whenever you change files you end up bouncing across the screen quite a bit. Perhaps I'll move it over today and see how it feels.


I agree with you, however I like to have my main solution explorer on the left with second solution explorer scoped to my Models or another project I am actively working with within the solution docked on the right.

I wonder if they kept the default layout to keep it as simple and "out of the box" as they can in order not to confuse newcomers to the Visual Studio way of doing things.


meh , VS devs get used to that , like the horrible theme colors in the latest VS. I said good for microsoft if they offer developers choice. And it means opensource is kinda winning. But i'm waiting for the day Windows is POSIX to go back to that os , windows is too crappy for Open-source devs even with ming installed...


Visual Studio color schemes http://studiostyl.es/


- Add/Remove features

- Install SUA

Enjoy


I'd say it's broken beyond repair. They're doing a nice job in some way or another getting the best out of their ecosystem. But ever since I've stopped developing for Windows a few years ago, I never had the slightest urge to go back. Why should I? Even if they make it POSIX compatible, for me there is no reason to go back to windows for personal use.


I think Visual Studio is the best IDE there, but I'm not sure I'd be more productive switching from a nix based environment just for the IDE. Would anyone whose gone from nix to windows for python web development be able to comment on the experience and tradeoffs?


IntelliJ is the best IDE :).

Eclipse Python support is lacking.

NetBeans seems to come along pretty well, I just hope that they have more support.


I can't stand IntelliJ, nor eclipse or NetBeans. I used to develop with TextMate, these days it is all vim.


> Eclipse Python support is lacking

what is it lacking exactly? (using Eclipse with Python daily for the last few years)


I've been pretty happy with the PyCharm edition of IntelliJ (picked it up during that fire sale a few months back).


Does the community edition support Python?


According to this matrix[1], no. I use PHP, Python and Ruby on a day-to-day basis and really need an IDE that can support all of these. Eclipse is flaking out on me now as well.

Anyone know if IDEA really the best multi-language Eclipse alternative, or is there something better?

[1]: http://www.jetbrains.com/idea/features/editions_comparison_m...


Komodo IDE 7. Seriously the best IDEA I've ever used for dynamic languages. Their CodeIntel (think intellisense for Php) is worth it alone.


I like it well enough for python, php, javascript, css/html and android/java. Used it once or twice for ruby, but not enough to know how good it was as I have never used ruby otherwise. Intellij is also its own code base, not another fork of eclipse, like most IDEs out there. Intelij also has built in support for git, hg, github/bitbucket, pretty much any SQL dialect including SQLite (as well as SQL syntax checking ERD diagramming, and table editing). Unit testing integration for python, php, javascript, java. Django support (and for templates), Google App Engine (python and java), jQuery support, javadoc support, epydoc/restructured support, phpdoc support, jsdoc support, and some of the popular php frameworks. I could go on, but you can see it pretty much comes with everything one needs (and what one does not need can be disabled from plugins). If it does not come with it, open a feature request and they'll probably add it later.

Other IDEs I have used:

- Aptana (PHP, html/js, css, python). It's really a fork of eclipse with some additional features. If you want a free IDE, it's better than eclipse, but not quite as good as intellij.

- Visual Studio (2005, 2010, 2012). Great if you are doing C# or F# and combine it with Jetbrain's Resharper. Not as fond of it for other languages though. I've heard JS support is also very good now, but my web development is all scripting languages like Python and PHP so it does not help me much.

- NuSphere's PHPed. A good natively compiled IDE for PHP and web, but development kind of lags behind other IDEs and a few bugs that were never fixed when I used it would constantly annoy me. Also, only Windows unless you do WINE (it worked well enough on WINE though).

- Eclipse. Eclipse interface is clunky and honestly, it's slower than Intellij or any of its derivative cousins. Aptana improves on it though. Used Eclipse for a couple of years before finding Aptana and then moving onto Intellij.

It's not just about the IDE though, jetbrains in general is a great company. Despite English not being their first language for many employees, they have awesome customer service and are very up front about their road map and interact with their users directly.

I've used some commercial IDEs in the past, such as NuSphere's PHPed (which was a decent IDE at the time, not sure how it is now). PHPed's developers did not speak English as their primary language either, but they did not have anywhere close to the same level of interaction and support. Jetbrain's bug tracker is open for anyone to report on and they actually fix stuff you report (filed a few reports over the past few years, all were eventually fixed).

Maybe I'm just getting overly excited over what any decent company should be doing in the first place. However, many IDE vendors do not seem to do that overly well. Having confidence in the developers of your IDE is important (at least to me) and that they are listening to their customers/users.


Definitely wouldn't be worth it just for using a Visual Studio plug in for Python development. And I am of the camp that thinks visual studio is the best IDE out there.


Thank you for actually answering the question I asked!


Specifically for Python / Django development, PyCharm is very good: http://www.jetbrains.com/pycharm/


Indeed, I agree but that wasn't my question. I was specifically wondering what developing on windows, in VS felt like for developers who are accustomed to using *nix based environments and tools like Pycharm/Eclipse/ST2 etc.


Whats the downside anyway ? Since i run all my code on linux VMs, i dont really care for the OS i run my editor in. Windows7 + cygwin and dev enviroment VMs are fine for me, dont see any downside to using OSX for example.


I believe you're doing it right with the Linux VMs. That's how I roll and it makes me pretty indifferent to my host environment whether it's OS X or Win. Currently on OS X, but might be switching back to Windows. My dev process will likely remain unchanged...


I moved mostly from Linux and vim to windows + pycharm. Still deploy to Linux. I use cygwin for commandline work. Its gone a lot better than expected. Pip works, django works, local MySQL works, much to my amazement.


dunno about python, but good debugging support is a huge plus for IDE.


I'm a .NET dev and I literally just gave this a try last week. I've been toying with Python on my Ubuntu laptop but I really wanted to see how this worked on Windows too. Visual Studio is by far my favorite IDE and being able to write Python in VS was pretty amazing!


Why are Visual Studio's menu's yelling at me?


VS2012 did a lot of visual changes, many of them controversial. The guise was to make it "more metro" despite Windows 8 not taking the same approach (like all caps).

The VS 2012 betas tried putting all caps on various parts of the UI. They got tons of pushback on that, so they eventually just made it the menu so they could still claim they kept the principle idea alive. In the final release, there's an option to turn it off.

A lot of VS devs are happy that they added a proper dark mode, and there's a plugin to autohide the menus so it's less of an issue that it appears at first. The biggest usability issue is the single-colour icons.

There's probably amazing internal threads and all sorts of political issues surrounding the design. In the end, I think the champions of the change count on wearing you down, making their opponents feel silly for arguing over such petty things as menu styles.


"To complete this tutorial, you need a Windows Azure account"

yeah, right.


You only need an azure account if you want to deploy your app, the last step. If you just want to run locally and check out python in VS, you don't need an account.


It looks like you could also use Azure WebSites which gives you a free instance.

http://www.windowsazure.com/en-us/develop/python/tutorials/w...


FYI: there is free azure access as part of bizspark


I'm curious to know how VS compares to PyCharm in terms of how rapidly the Python environment is able to restart after a code refresh.

It's been my personal experience that PyCharm's Run/Debug configuration is fast to restart in Run mode, but considerably slower in Debug mode, taking 5-10 seconds to restart and attach the debugger. So while I'd like to be able to work with breakpoints and inspection always available, in practice those tools have been harmful to my productivity.

If VS is better or faster in this regard, it might be worth a try.


In my personal experience with working in .NET MVC within VS 2012 it is noticeably slower working with Debug always on as you cannot simply build and refresh the code, each time you need to load the debugger, test drop out of debug, fix, repeat.

I prefer to do as much without debugger and then when I need to inspect variables and step through code drop into debug mode.

With Python this may be different but I doubt it. I expect you will have to wait while the debugger loads up. If you can edit code whilst debugger is running then I can see that being a big plus and a reason to keep it on.


Running a Hello World is easy

Maybe they got it to be easier in Azure, still, here's a couple of things they didn't show how to do and is usually a pain:

- serving static resources (easier with newer Django versions, still)

- serving in a subaddress (like serving it from mycloud.com/myapp)

- Using MSSQL with it (there are Django adaptors, but last time I tried there were some issues)


Someone changed the title. Any reason for that apart of some people not agreeing with my world views?


Sensationalism is a type of editorial bias in mass media in which events and topics in news stories and pieces are over-hyped to increase viewership or readership numbers. [..] Some tactics include being deliberately obtuse, appealing to emotions, being controversial, intentionally omitting facts and information, being loud, self-centered and acting to obtain attention. Trivial information and events are sometimes misrepresented and exaggerated as important or significant, and often includes stories about the actions of individuals and small groups of people, the content of which is often insignificant and irrelevant relative to the macro-level day-to-day events that occur globally.

http://en.wikipedia.org/wiki/Sensationalism


I'm not sure what the original title was here, but in this case the revised version suggests more or less why someone here would want to read it.

About a month ago someone posted an essay on the Python Requests library in a literary journal and titled it something like "A Literary Review of the Python Requests Library", which essentially described what the essay was about: a review of the Requests library as if it were a literary work (http://thediagram.com/12_6/rev_reitz.html).

I noticed this, read the article, and enjoyed reading about Python in an entirely different context.

But then some wise soul determined the word "literary" to cause far too many sensations and updated the title to "Review of Python Requests Library"(http://news.ycombinator.com/item?id=5073250), changing the title from something apt to something misleading. As a review of Requests for the HN audience it isn't very good (the review is accurate and well-written in its context, but my guess is a review containing the sentence "Requests is written in a programming language called Python that's known for being easy to read" is perhaps not aimed at the average HN reader looking for a technical review), but as a review of a Python library as if it were a literary work is both funny and thought-provoking.

Would the article have gotten any more attention under its original title? Maybe, maybe not. But this happens noticeably often and it would be nice if folks changing these titles puts a bit more thought in to some of those changes, and not strip out those words meant to describe why someone here would read an article.


Heavy editorializing in the title is frowned upon. Simply post a link and let people make up their own mind what they think about it.


Because nobody cares about your world view.

From the HN submission guidelines[0]:

> ... please use the original title, unless it is misleading or linkbait.

[0] http://ycombinator.com/newsguidelines.html


i agree with you though, it's an abomination


Just go download Komodo.

I regularly use Komodo Edit (100% Free) and it is pretty good, the IDE is even better if you want a more involved tool. This is probably my favourite for a "windows like" experience.


To think that people use an IDE for Python is sad news for me.


Real programmers use cat.


Real Real programmers use echo


real programmers use butterflies


IDE's has their place especially when working on along the lines of Java, .NET, large C++ codebase etc. For Python I would expect people to use vim or emacs and alike.


vim is nice, but I'm still struggling to get 100% auto-completion (I'm using jedi-vim and sometimes it doesn't find stuff I'd expect it to) and I have no refactoring ("extract method", "change definition", etc.) or "go to definition". Can you recommend me how to configure it for Python editing? I've tried many guides, the one I used is http://redkrieg.com/2012/12/11/writing-python-like-a-jedi/ but it still lacks a lot of things... Thank you very much!


ctags - http://ctags.sourceforge.net/ should give you "go to definition", no matter what you use emacs or vim

here is something with a bit more detail - http://tartley.com/?p=1277


text editors are for wussies. sed to write. cat to read.


here you go troll, watch the one minute demo. tell me you can edit code with this kind of an efficiency in your IDE - https://www.destroyallsoftware.com/screencasts


wut? that looked like a text editor to me. VIM + shell is an IDE of another kind and its what I use (or Sublime Text, when I feel like it). apparently you think I was advocating the use of IDE's because I made a joke. who's the troll now? dick.


Coming Soon - How to develop Ruby on Rails apps on an Etch-a-sketch


I knew this was going to get downvotes, but come on, doesn't this seem to anyone else just a little bit desperate on Microsoft's part?

They're giving out bad advice to sell bad tools. I'm a little disheartened it's got so much attention on here.


Have you used VS? What's your basis for dismissing it as a "bad tool"?


Yes, I spent a year using VS full-time for .NET development, and I think it's a ridiculously contrived way of developing Django applications.

Hence the promotional 'articles' like this from Microsoft.


My goodness, a whole year.

People bitch and moan about Microsoft being closed off from the rest of the development community, then when they offer the rest of the development community a way to use VS to write in their language of choice, they get this crap.

A lot of what Microsoft does is shit, but the constant and pointless anti-MS circle jerking is ridiculous.


Grow up. I'm not bitching and moaning, nor am I anti-MS. I told you I worked with MS languages.

I just think this is a crap way of doing Django. Just like developing Silverlight apps in VIM would be.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: