|
fletcher posted:I want to write some automated tests for a REST API, what's a good tool/library to use to do that? Rest of the project is in Python, if there's something out there to keep it in the same ecosystem. I would just use Django's TestCase and client if you're using Django (just guessing since you post in the Django thread). There might be something else purpose-built, I have no idea, but it seems like a pretty simple thing to just do with TestCase.
|
# ¿ Dec 3, 2013 00:46 |
|
|
# ¿ May 9, 2024 00:37 |
|
pipebomb posted:Yeah, he does magazine, newspaper stuff. I used the h1 = headline and so on analogy. He absolutely freaked that I sent links explaining what some elements were. Some people are loving idiots and you've got to 1) Get a new job. 2) Murder. 3) Deal with it.
|
# ¿ Dec 17, 2013 04:07 |
|
Harik posted:I was playing with a data-driven site in django and nearly barfed at the tutorial: That's not logic.
|
# ¿ Apr 4, 2014 19:16 |
|
Doc Hawkins posted:Even worse, it's a law of Demeter violation! Maybe. I mean, you could have a template engine whose only tag is: code:
|
# ¿ Apr 4, 2014 21:53 |
|
I'm looking for ideas/inspiration for a modern-looking way for adding a related object in a CRUD-style app. For example, say I have a form for adding a Job to the users database. A Job can have associated Vendors and the form allows the user to select an existing Vendor or add a new one. What's a nice way of doing this? My current dumb version has a section of the form that has a list of currently added vendors, a section for selecting an existing vendor, and a link that pops up a modal with a form for adding a new vendor. Any other ideas, or can you point me to any sites doing this in an interesting way?
|
# ¿ Apr 7, 2014 21:55 |
|
Kobayashi posted:Are you talking about the UI? Yes.
|
# ¿ Apr 8, 2014 02:41 |
|
ruden posted:Reading about Angular and other JavaScript frameworks seems to indicate the current designs revolve around basically having your input/output exposed as an API and using Angular to pull in content, rather than have the server render a page for way request. This is a reasonable and modern way to do it. Another reason for this is that your web page feels more responsive, native, and interactive to your end users. Angular is great, but you might want to spend a bit of time comparing some alternatives. Right now I'm really liking React.
|
# ¿ May 5, 2014 21:39 |
|
fuf posted:How come? I have no experience on the matter, but MongoDB gets brought up in the Coding Horrors thread semi-frequently. Before you jump in to using it because it's the hot cool thing, I'd investigate why that is. I'd also push you to learn a different language for the backend. Not because I have an opinion on Node, but because learning a new language once you know one isn't that big of a deal...especially if you choose something like Python which is very similar to Javascript...and running a server knowing just JS seems like a bad idea. Heck, you might learn something like Python and still end up using Node, but picking Node because you just know JS doesn't seem too smart when the hurdles to learning another language aren't terribly significant and will open up your options significantly.
|
# ¿ Jun 16, 2014 16:57 |
|
fuf posted:What I really want to know is if Node is actually significantly slower, less reliable, or less secure or something, because that would be a good reason to change. I have little experience with Node, but I do not know of any problems with it in those areas. fuf posted:You mean like managing a server? I've been doing that for a while with just bash. I don't know what I really meant by that! I guess what I really was doing was using the "only-knows-one-language-and-it-is-js" fact as a proxy for "has thoroughly evaluated the available options".
|
# ¿ Jun 16, 2014 18:57 |
|
Lord Windy posted:I'm really new to all this (not programming in general though) and was wondering, what do these frameworks offer? So, you've got a programming language, a database, and a Web server. You're now about 1 million steps away from actually working on your app because you've got to write code to map your data onto the database, manage Web browser sessions, create user registration systems, cache views, develop a system to get data from database to HTML, a thousand other things, and a hundred sub parts of each. Or you could use a framework.
|
# ¿ Jun 17, 2014 07:55 |
|
This conversation made me want to point out that a good IDE can jump straight to the CSS defining a class or id or whatever from the HTML, so that helps with finding poo poo too. In JetBrains products like PyCharm or WebStorm you can Ctrl click or press Ctrl-B to jump to the declaration in the CSS. I assume other IDE's can do that to.
|
# ¿ Jun 20, 2014 03:31 |
|
Pollyanna posted:What I want most in a framework is offering functionality like responsive sizing and components, and having a sane layout whether it be grid, long, or whatever. For it to be a good framework, all that needs to be separate from how it looks - I want the framework to help me organize and functionalize what is presented and how it behaves, without laying down any rules about what everything looks like. Bootstrap comes with a look. You can change it however you want. People use the default look because it's easy, but the alternative of no styling at all is a lot of work for developers who will either do a bad job or not bother making whatever product. I mean, I get sick of seeing default bootstrap styling, but I like it better than the alternative.
|
# ¿ Jun 27, 2014 21:22 |
|
At a high level here's how your site would work: 1. You have a scraper of some sort scraping prices from websites and depositing that information in a database. 2. You have a framework of some sort which handles user authentication, mapping database information into HTML templates, abstracting the database, and a hundred other things. 3. You have a web server which the framework communicates with. Using Django in the next few sentences as that's what I've been using a lot lately... For step 1 you write python scripts which download websites and parse data from them. These scripts use Django's ORM to easily deposit the information into your database. For step 2 you write views and templates which hook up your models of the data to HTML the webserver (step 3) can send to the clients. Honestly, you're probably not going to get a good handle on this until you jump in and just do something. The official Django tutorial is good.
|
# ¿ Jul 20, 2014 03:53 |
|
zfleeman posted:This is probably a dumb question, but why use <section>s in html5 over divs? section is a semantic tag used to indicate that the included content is related to each other. div has no semantic meaning at all. As far as the why goes...well, I guess it's because it makes more sense. I assume it will help search engines either now or in the future.
|
# ¿ Jul 27, 2014 20:35 |
|
fuf posted:Are any of those cool project management sites / software geared towards one-man operations? Github works well.
|
# ¿ Jul 31, 2014 20:47 |
|
I'm designing an API right now that presents some objects like so:JavaScript code:
JavaScript code:
1. http://blahblah.com/place/1/special_output/ 2. http://blahblah.com/place/1?special_output=true or what? If it's just personal preference I think I'll go with #1 as I prefer the cleaner look of urls without query parameters, but if there's a standard for REST API's (that I can't seem to find right now), I'll stick to the standard.
|
# ¿ Aug 8, 2014 18:32 |
|
Munkeymon posted:I'm not aware of standards around this - I just see "X is optional" and think immediately of the query, not the path. You've gone one farther and said "X is optional and just modifies the output". /place/id?xml=true is a clearer logical parallel that I think makes the the case a bit better. This is a good point and you've convinced me.
|
# ¿ Aug 8, 2014 19:38 |
|
Sedro posted:...good points... I get a lot of that for nearly-free as I'm using django-rest-framework, so that's something.
|
# ¿ Aug 8, 2014 19:49 |
|
Munkeymon posted:Yeah, you're technically right, but doing that from a browser is kind of annoying and could behave in unexpected ways, and that's the perspective I'm coming from/assuming. The server could easily just check both to be a more friendly API, I guess. Yeah, the real issue from my viewpoint is that so many sites do the format selection via a query parameter that consumers kind of expect it. A lot of sites support both the HTTP header and a query parameter.
|
# ¿ Aug 8, 2014 20:59 |
|
Pollyanna posted:Is there a better way to format address information than like this? Umm, it depends on why and where you want your information.
|
# ¿ Aug 24, 2014 23:32 |
|
I need to whip up a dashboard style site with Boostrap 3 (like these, but I don't care where it comes from). For right now I'm just looking for a pre-built theme. Anyone have any they've used an particularly liked?
|
# ¿ Sep 1, 2014 21:17 |
|
kedo posted:Looking for opinions. Django.
|
# ¿ Sep 4, 2014 23:27 |
|
Heskie posted:might have to go look into Django some more then. I'm not sure if others would agree with me, but it's probably worth reading through introductory Python texts before you try to jump right in to Django. Learn Python the Hard Way and Think Python are both widely recommended. Also, the Django thread.
|
# ¿ Sep 5, 2014 17:47 |
|
My Rhythmic Crotch posted:I've gone from Python back to Java for back-end stuff at work. It's much higher performance and there is excellent support for json, databases, etc. The downside is that most Java web frameworks are very heavy, in the sense that they seem to include every piece of the stack for you and make it difficult to deviate from that. I'm sticking with the Spark "micro framework" and while it's definitely not perfect, I really like how minimal it is. While I think this might be generally true, I'm not sure that it matters for 95% of back-ends. I mean, if you enjoy Java, then it's a fine thing to write a web backend in...I've certainly done so. However, I seriously doubt most people should be choosing any of the popular backend languages based upon performance. They all have enough performance for the vast majority of needs.
|
# ¿ Sep 6, 2014 23:20 |
|
prom candy posted:Why all the Django recommendations and no recommendations for Rails? I always thought Django was fairly unpopular compared to Rails, am I so out of touch? You're out of touch.
|
# ¿ Sep 8, 2014 07:16 |
|
fuf posted:I might be wrong but I do feel like there's a little bit of favouritism towards django on these forums for whatever reason (myself included). I think this might be true. I am sure that Django isn't "fairly unpopular" compared to Rails.
|
# ¿ Sep 8, 2014 18:26 |
|
Loezi posted:What do you guys think about Spring (or Spring Boot) for Java? Just work through the official tutorial. It's short enough so you don't get irritated reading stuff you already know, but detailed enough you learn how Django works.
|
# ¿ Sep 11, 2014 07:56 |
|
Every time people start talking about gulp/grunt/whatever, it just starts getting me irritated about how ridiculous the whole web deployment system is.
|
# ¿ Sep 12, 2014 03:04 |
|
nexus6 posted:Do you mean with or without gulp/grunt/whatever? I don't use anything like that through a combination of ignorance about them and stubborn/unchanging business processes at work. I mean that there is even a need for gulp/grunt/whatever.
|
# ¿ Sep 12, 2014 17:26 |
|
Ahz posted:Would I care about some of these tools like grunt/gulp for deployment when I'm using an IDE like Pycharm for a Django project? For example, Pycharm has built-in watchers that compile my LESS files for me on every change. No, you can do all of it through PyCharm. Though, if you're doing Python stuff, you should use Heroku or the like for your deployment anyway!
|
# ¿ Sep 13, 2014 00:21 |
|
Maluco Marinero posted:The problem with an IDE doing all that stuff is that there is certain elements required to actually do work on your project, that are tied to the IDE and not into the project files. PyCharm/WebStorm can do the exact things grunt/gulp/whatever does. Unless your point is that you should have your grunt/gulp/whatever config as part of your repo. You can do that with PyCharm as well. In fact, you can configure PyCharm to integrate with grunt and run your tasks and stuff.
|
# ¿ Sep 13, 2014 00:33 |
|
Maluco Marinero posted:If you can guarantee that every person in your shop and all your potential contractor resources use PyCharm/WebStorm, go for it. If not, they should not be tied to the project like that. My point is that you should be able to onboard developers with a fairly minimum set of dependencies, IDE is not always a good dependency to have compared to say a base like Node/Vagrant, because they are both freely available with installers on all platforms. Oh yeah, I agree with this. I was just saying that the way your original post was worded it sounded like you might be saying you couldn't share your build configuration with PyCharm/WebStorm.
|
# ¿ Sep 13, 2014 13:26 |
|
What do you call those pages whose sole point is to get your email address to tell you when the real site rolls out? I've got a site that will be rolling out within a few months and I'd like to throw up some Google ads for relevant searches and get people to sign up for an email saying "yeah, that site you were interested in is now live!". I'm trying to search around for examples for inspiration, but I'm having a hard time finding them as I don't know what they're called. Alternatively, if they're not really a thing with a name...anyone have some good examples?
|
# ¿ Sep 27, 2014 17:33 |
|
Uziel posted:Transactional landing page. I don't have a good example unfortunately but I know exactly what you mean. Oh that's great. Lots of good google results for that term. Thanks!
|
# ¿ Sep 27, 2014 18:20 |
|
Blinkz0rz posted:Also fix your dependencies to a single version and then test against any updates. I'm not sure if you're saying this, but this reads like you could be saying this so...you can use a CDN and fix against a specific version.
|
# ¿ Sep 28, 2014 20:42 |
|
Whalley posted:This isn't really a question or anything, but I've just started learning Angular.js and holy poo poo I've got half a dozen projects that would have been so easy to complete had I learned this earlier. Angular.js is so fuckin' nice. prom candy posted:I'm finding the same thing with Ember. Two-way data binding is so much nicer than loving around with events. You guys are going to be ecstatic when you try React. (or maybe not, but it's pretty fuckin' sweet)
|
# ¿ Sep 30, 2014 20:37 |
|
prom candy posted:What's the deal with React? What's it good at that Ember and Angular are bad at? Being fast. The way it makes you think about your apps. It's conceptually small, so easy to understand. Documentation.
|
# ¿ Oct 1, 2014 00:06 |
|
React is so simple you should just go do the tutorial and read the docs. It certainly won't do everything a heavier framework does out of the box. Remember that you build and think about apps differently with React and if you need to, you can use it with other libraries.
|
# ¿ Oct 1, 2014 01:15 |
|
Pollyanna posted:As far as I can tell, React does not specialize in proving an MVC framework. It seems like it focuses on alleviating the complexity of creating a View for your data, whatever that data happens to be. React is actually so divorced from the traditional MVC setup that I wouldn't call it MVC at all; it displays data, but does not work with data. I feel like you may need something to accompany it, like Backbone or somesuch to fulfill the M-C part. That's what React is, so yes. However, for many MVC-library-using projects, the common MVC frameworks are overkill.
|
# ¿ Oct 1, 2014 19:10 |
|
|
# ¿ May 9, 2024 00:37 |
|
fuf posted:I guess I should just run a virtual linux machine? This is what I do, and it works perfect. I developed straight on Windows for years, but a couple years ago I decided to move to my current setup with Ubuntu in VMWare on two of my three monitors. There's always some little issue on Windows with all these tools and libraries. There's some ancillary benefits as well. I really like being able to just suspend the VM when I'm done working without worrying about stopping ongoing tasks saving files, etc.
|
# ¿ Oct 8, 2014 15:41 |