Java or C#? - Page 3
Blogs > pQylling |
Azzur
Australia6260 Posts
| ||
Deleted User 101379
4849 Posts
On July 04 2011 14:38 joban wrote: Thank you for this, that was actually really informative. I used to fuck with Textmate, but when I switched to terminal (yes, I use a mac. you'd be surprised at how dominant the mac platform is in silicon valley among consumer internet companies- I know I was) I've haven't looked back- so I don't even know what most IDE's can do. I do 99% of my programming work with vim, but i'm really happy when there is some C# development to do for which i can use VS. I've tried a lot of free IDEs, Eclipse, Netbeans, kdevelop, ... but none of those even gets close to what VS has to offer. It was a big factor in my decision to use C# for most of my private projects. About Java and C#, the only reasons why someone should choose java would be either required portability (though mono does quite a good job for C# except for ASP.NET) or an existing java environment. Java just has a lot of design decisions that don't make a lot of sense (to me) and it fell behind in features, so compared to C# it's just clumsy to code in Java, though i have to admit that it could have changed in the two years that i didn't touch java anymore. In terms of web development i only did some asp.net stuff, which was ok but not really what i prefer. ASP.NET is ok, it can do quite a lot, but it adds a billion layers which often make it a hell to use. If you are going heavy into web development i suggest either going the PHP route or trying Java (though i have no experience with java web development). My most recent private web project uses a thin php frontend with a lot of javascript and all the heavy work is done in a C# server (did you know that .NET actually provides a complete embedded webserver? i was suprised when i found that out :p) to which the php frontend connects via TCP/IP. It allows me to use the strengths of each language to it's fullest while i'm still avoiding most of the weaknesses... but it's still a complex solution not suited for beginners who can't differentiate between scripting languages and programming languages ![]() | ||
vek
Australia936 Posts
On July 04 2011 14:38 joban wrote: Thank you for this, that was actually really informative. I used to fuck with Textmate, but when I switched to terminal (yes, I use a mac. you'd be surprised at how dominant the mac platform is in silicon valley among consumer internet companies- I know I was) I've haven't looked back- so I don't even know what most IDE's can do. I like writing scripts/php/css/js etc in either Textpad or just through the terminal. I've tried using an IDE for php once and it just got in the way. I agree with you that using an IDE is not always the best solution. I think too many people use Eclipse as a "one size fits all" solution. That said, using Eclipse for Java development is amazing. You can auto generate so much boring code it really removes a lot of the effort of adding new features. I also love how easy refactoring with Eclipse is and how well it integrates with version control. | ||
vek
Australia936 Posts
On July 04 2011 15:07 Morfildur wrote:My most recent private web project uses a thin php frontend with a lot of javascript and all the heavy work is done in a C# server (did you know that .NET actually provides a complete embedded webserver? i was suprised when i found that out :p) to which the php frontend connects via TCP/IP. It allows me to use the strengths of each language to it's fullest while i'm still avoiding most of the weaknesses... but it's still a complex solution not suited for beginners who can't differentiate between scripting languages and programming languages ![]() Cool. We are doing a very similar thing in project my team is involved with at the moment. We use multiple Java components as the "back end" to do the database and archiving work. We then have PHP (and a lot of ajax) as the "UI layer". It's a super easy and flexible way of doing things. Load balancing is also a piece of cake because you can just launch more of which ever component is being hit hard. A really cool solution though :D | ||
obesechicken13
United States10467 Posts
On July 04 2011 13:49 InvalidID wrote: You obviously work in very different areas of software development then me. The IDE form editor features are significant time savers, for simple gui apps, but you may trade some level of control(though you don't have to give it that control, you can use VS as basically VI with contextual help, and debug integration, if you so choose). You basically can use a graphical editor to design a "form" which is basically a window, or a web page depending on if you are using windows forms or ASP+. You can then graphically assign assorted events to functions, and voila, you have the shell of a UI. It takes about 5 minutes to get a basic windows app setup, far less then manually coding all the controls in, and its visual, so you don't have to twiddle around recompiling a million times to get a simple UI to look the way you want it to. Again, and most importantly, you don't have to use the forms editor if you don't think it gives you the flexibility you want for your app, you can use it just like you use VI/command line with whatever additional features you desire. When you get into more complex apps, then maybe the forms editor loses its advantage, as you traded some level of control away to have a skeleton UI laid out for you. I have yet to see it pose significant problems, as you can over-ride pretty much anything the IDE does manually. Contextual help is probably the killer app of VS though. Basically, it provides a popup menu of the MSDN library documentation. For example, if I could not remember the correct function to split a string, typing string. would pop up all the functions under the string class for you to select from(though you can just ignore it and type if you know what you want, its basically like the autocomplete feature of google). It automatically generates the same for any other library you have included. It is implemented very elegantly, and once you get used to it, it is a headache to use anything else, and constantly have to look things up online. The debug features are also very well implemented, and it seems to save a lot of time. At any given break-point or error, or even run-time point, when you are running your app in debug mode, you can see the values of all variables in the memory of your app. You can do the same with the command line but it is far less elegantly implemented. VS is probably the main reason that Microsoft is so dominant in the enterprise: it is just an enormous time saver for writing the kind of apps we need to write in the enterprise. These apps don't need super fancy UI functionality, they need stability, simple text boxes/buttons, graphical displays simple UI logic, and low development costs. I am a big supporter of open source, but I have yet to see an open source offering with comparable functionality(though Eclipse is getting better). Yes, you're right. I'm mostly kidding, IDE's are definitely worth the time, but they can also be frustrating to use and sometimes they don't work properly with the shell commands or with debugging servers. It's quite a hassle to get them to work, but that's probably due to inexperience on my part. | ||
pQylling
Denmark139 Posts
I should have been more clear on this but what i want to do with these languages is to first of all learn them and become better at programming and slowly start to try my hand at creating small applets for my web page and maybe even for my phone. Just for fun. | ||
Deleted User 101379
4849 Posts
On July 04 2011 19:03 pQylling wrote: Thanks for the answers guys. It seems like i managed to cause some confusion with my mistake! I just assumed Java to be a scripting language since I believe programs like Unity use scripts created in Java and/or C#, correct me if I'm wrong but can scripts not be created with java (javascript, although it's not the same thing i guess) or C#? Also it is pretty clear that I am not well versed in the programming world. I just saw that C# had pointers and i guess my mind went "Ooh, I know what that is. gogo!". I should have been more clear on this but what i want to do with these languages is to first of all learn them and become better at programming and slowly start to try my hand at creating small applets for my web page and maybe even for my phone. Just for fun. When people mistake java for javascript (or the other way around) i always want to kill someone. Javascript has nothing to do with java at all, it doesn't even have the same programming paradigm (javascript is prototype based, java object oriented). If you want to develop for the phone it depends on the kind of phone you have. iOS based => objective-c, Android => Java, Windows Mobile => C# For your website you probably want javascript, which - as i said - has nothing to do with the other languages. | ||
berated-
United States1134 Posts
On July 04 2011 15:07 Morfildur wrote: I do 99% of my programming work with vim, but i'm really happy when there is some C# development to do for which i can use VS. I've tried a lot of free IDEs, Eclipse, Netbeans, kdevelop, ... but none of those even gets close to what VS has to offer. It was a big factor in my decision to use C# for most of my private projects. About Java and C#, the only reasons why someone should choose java would be either required portability (though mono does quite a good job for C# except for ASP.NET) or an existing java environment. Java just has a lot of design decisions that don't make a lot of sense (to me) and it fell behind in features, so compared to C# it's just clumsy to code in Java, though i have to admit that it could have changed in the two years that i didn't touch java anymore. I think the concept that a lot of people are missing when talking about IDEs, as well as almost every concept in programming, is you need to find the right tool to do the job you are trying to accomplish. I've been surprised by the amount of people saying that why would you use an ide, I just want to use vim, etc... I have an interesting perspective on this because I do both php dev and also do enterprise java web development - vim, textmate, other text editors are awesome when your code base is small. However, if the IDEs for php didn't suck so bad, I think a lot of people would change their mind as to what they preferred if their code base started getting large. My companies website runs roughly 1million lines of java code if you trace it all the way from front end to back end. One would be out of their mind if they thought they were not going to use an IDE to do their development. The ability to find where a method is called every where in the source code, move to a method declaration with one key press instead of finding what the object is, finding the class its declared in, and then opening that file saves an incredible amount of time. Other things like automatic compiling and built in maven integration make the IDE imperative for my job, but only because I have all the needs the IDE helps solve. In terms of web development i only did some asp.net stuff, which was ok but not really what i prefer. ASP.NET is ok, it can do quite a lot, but it adds a billion layers which often make it a hell to use. If you are going heavy into web development i suggest either going the PHP route or trying Java (though i have no experience with java web development). When deciding which language to use for web development, one needs to ask the same questions. For a simple website the overhead of firing up a tomcat/jetty/jboss/glassfish server with a full jvm is way over the top. Phps ability to just change out files and automatically have your changes in are better for minor tweaks - to accomplish the same thing in java you have to reload an entire webapp ( excluding more advanced techniques ). For larger full blown web applications though - being in a jvm with the support of a framework like struts or stripes makes things quite a bit easier. My most recent private web project uses a thin php frontend with a lot of javascript and all the heavy work is done in a C# server (did you know that .NET actually provides a complete embedded webserver? i was suprised when i found that out :p) to which the php frontend connects via TCP/IP. It allows me to use the strengths of each language to it's fullest while i'm still avoiding most of the weaknesses... but it's still a complex solution not suited for beginners who can't differentiate between scripting languages and programming languages ![]() netbeans can do the same thing - it can actually run both embedded tomcat and glassfish servers. | ||
Deleted User 101379
4849 Posts
On July 04 2011 21:22 berated- wrote: netbeans can do the same thing - it can actually run both embedded tomcat and glassfish servers. Thats still the IDE, not the language (or rather framework). .NET has a full WebServer integrated (it even works with mono). Writing your own Web Server is as simple as writing
It makes some tasks very trivial, in my example i use it in the server to recieve REST-like messages. The whole networking part is in the above 4 lines. For that project I was originally writing standard TCP/IP networking code which spanned quite a few lines and i was very happy when i found out that it's actually that easy (eventhough HTTP is of course slower than just TCP). In the PHP frontend i just use CURL to send and retrieve data, so i don't even need to bother with networking code there. Anyways, you are definatly right about PHP IDEs, i'd gladly use one (though most of the development is done via SSH on the dev server) if they wouldn't be so horrible. In part it's actually PHPs fault though, or rather a problem in languages with no strict types. If a single variable can have 10 different types in just as many lines it's hard for the IDE to understand which type the variable has at any given point in the code and provide the correct code completion. Example:
IDEs in PHP mainly work as shortcut for the manual by providing the prototype for the PHP functions... which you usually can remember anyways after using them a few times. | ||
haduken
Australia8267 Posts
![]() Entity Framework is also good. I can't stand the lag on Java IDEs. | ||
berated-
United States1134 Posts
On July 04 2011 21:50 Morfildur wrote: Thats still the IDE, not the language (or rather framework). .NET has a full WebServer integrated (it even works with mono). Writing your own Web Server is as simple as writing
It makes some tasks very trivial, in my example i use it in the server to recieve REST-like messages. The whole networking part is in the above 4 lines. For that project I was originally writing standard TCP/IP networking code which spanned quite a few lines and i was very happy when i found out that it's actually that easy (eventhough HTTP is of course slower than just TCP). In the PHP frontend i just use CURL to send and retrieve data, so i don't even need to bother with networking code there. Anyways, you are definatly right about PHP IDEs, i'd gladly use one (though most of the development is done via SSH on the dev server) if they wouldn't be so horrible. In part it's actually PHPs fault though, or rather a problem in languages with no strict types. If a single variable can have 10 different types in just as many lines it's hard for the IDE to understand which type the variable has at any given point in the code and provide the correct code completion. Example:
IDEs in PHP mainly work as shortcut for the manual by providing the prototype for the PHP functions... which you usually can remember anyways after using them a few times. Ahh, I see about what you are saying now with .net - my bad on the mix up there. More than the language though - that's just a good design for realizing that there is reusable code that can be wrapped easily. Kudos to .NET for pulling it into their language. To stray a little bit, that's actually the main reason I love programming in java and why if the op really had to pick a language out of java/c# for anything other than windows development I'd go with java. The top-level apache projects provide so many reusable libraries from solr/lucene to camel to hadoop to the apache-commons libraries that you can solve almost any project by just integrating them into your own needs. Not reinventing the wheel is pretty sweet. | ||
| ||