Related
Let me start by saying that I do not know whether this is the best stackexchange site to ask this. I am not directly asking for an opinion on which is best (although obviously it would be appreciated). I just simply need some guidance.
I am wanting to start on a hobby project but its going to be a big old thing so I wanted to start off small. I basically need to know how to stream a video of my desktop (or any desktop) into a WPF application. Future enhancements would include doing multiple displays from different computers on a network into a WPF application.
I have done some research and someone has given me a list of Libraries that I could use avlib, ffmpeg, gstreamer. So I started with the first two and could find ffmpeg however I found people stating that it is better to use libav. But I couldn't find any information on avlib really, is libav a successor to avlib and that is why I can't find it?
Finally all these articles that I were reading were from 2012 as well so I don't know whether there is an even more up to date version. The last release notes for libav were from May this year so my assumption is that this is still being developed.
Any guidance would be really useful as I am not sure where to start looking (even if it is telling me which site would be best to post this on).
For FFmpeg vs. Libav, see this post. Beyond what you'll read there and in the posts linked from there, this is entirely opinion-based. See also this, which is relatively fair although a bit old.
For FFmpeg/Libav vs. GStreamer, this really depends on what type of API you prefer and what special plugins you need that are only available in one or the other. Read docs for both, play with both and see which one suits your needs and/or preferences better.
Because I'm a non-native English person, i use a lot a dictionary.
Now I'm learning C# and i was thinking to if I'm allowed to build an application which will run on my machine, but it will use the google/babefish translate service, or any other translation/dictionary online tool. It takes time to go on the browser each time and search for the translation of a word.
If is legal, what do u think of this type of application? At this point i see some problems regrading speed bc of querying, parsing the page, etc.
Yes, and actually Google Translate has an API for you to do this:
http://code.google.com/apis/ajaxlanguage/documentation/#fonje
The Wikimedia foundation has database dumps from their projects online. You can download the Wiktionary dictionaries from http://download.wikimedia.org. Of particular use would be the one for a language you know well, so you can translate words in any language to your own.
For example, if your native language is Esperanto then you would download "eowiktionary" from http://download.wikimedia.org/backup-index.html
If you're learning C# this might be an interesting and useful project for you. And the Wikimedia data is certainly free for you to download use in this way. All Wikimedia content is licensed under the GNU Free Documentation License.
It may be worth considering a desktop Gadget which does a similar thing.
Vista has sidebar gadgets which will do this, OS X has dashboard widgets which will do this, and Google Desktop has gadgets which will do this.
There are literally thousands of dictionary software which you can download or buy. I even have one on my phone. Its perfectly legal to create your own if you want to. However, unless you come up with some new invention to the existing plethora of software, it might be hard to find people willing to use it.
So I've been learning C# for like a year now (I'm 20 years old) and I'm getting pretty confident with it. I've also been meddling with C++ every now and again. For example just recently I've been following the Nehe OpenGL tutorials for C++ and I find it a fun way of learning.
I want to start looking at creating cross platform GUI software after I stumbled across this library called FLTK (fluid something rather). After finally and painfully getting it to work I found it refreshing to know that there are solutions for GUI creation in C++, however I think FLTK looked pretty old.
So I googled around for some newer GUI frameworks and decided to start playing with wxWidgets (decided against Qt because of licensing).
I downloaded it, compiled it, and looked to see if there were any IDE plug-ins for RAD development, as you can imagine going from drag and drop a component onto a form in C# I was hoping for something similar.
I learned that code::blocks has something of the sort so I tried that out. It was alright but the thing that turned me off was the horrible code completion; it would only show members and methods in the current object and nothing for the #included header files. I understand that code completion/IntelliSense isn't easy for C++ but Visual Studio 2008 handles it pretty good. I did find some other RAD tools like wxFormBuilder but it costs money, not something I want to do for simply learning.
So my TLDR question is if anyone has had experience with wxWidgets? Do you just develop in whatever IDE you're comfortable with and just code the GUI? Meaning no visual helpers? Perhaps you could give me a nudge in what direction I should be going :)
Thanks, this is also my first post on this site albeit I have read many threads before that have helped me solve copious problems. Cheers!
My suggestion is to learn how to do GUI layout with wxWidgets in code, then when you get good at it learn how to use the GUI tools.
Doing this kind of work manually for a while gives you the understanding about what you need ("Ok, I need a wxSizer, vertical, to put these two horizontal wxSizers into, where I put my a wxStaticText and a wxTextCtl for each line ...")... where as I think if you started out with the GUI tools you'd just tend to get annoyed because (last time I looked) none of them were Drag And Drop editors like you get with .NET.
Definitely give Code::Blocks another try. It is a WONDERFUL environment to work with wxWidgets in. It comes with a form designer and templates for wxWidgets projects, so I can't imagine working without it.
Also, for a good beginner's introduction to wxWidgets, try this page. It helped me alot when I started with it.
I use wxWidgets without using a drag and drop designer. There are obviously drawbacks to that approach but an advantage is that you don't have any horrible automatically generated code to deal with. In the past I've found having such code in the middle of my project has caused various types of grief - especially if you decide it needs some serious changes it is often necessary to start from scratch because form designers are so much better at "writing" as opposed to "editing".
For simple applications you can assemble a UI using a mixture of customized and standard widgets without too much difficulty. Check out the wxWidgets samples and demos, which use that approach. My chess app (see my website) uses this approach too.
A more elaborate UI could possibly be implemented by writing something special at a higher level of abstraction. The kind of thing I am thinking of would be a subsystem that accepts high level flexible requests to provide different types of user interface functionality, and then sorts out the details of the controls to create and the positioning etc. of those controls itself. That is kind of a technical fantasy of mine but I haven't ever really attempted to do it. Actually, a fairly primitive facility of this type is already available and used by the demos I mentioned; It is called a "Sizer" (class wxSizer) and is basically a control container.
Finally I would point out that problems with the Qt licence have basically gone away since Nokia bought Trolltech and made it "more" free (LGPL licence). Many people think Qt is the way to go these days. I am pretty happy with wxWidgets but will definitely evaluate Qyt seriously one day. Good luck with your projects.
I have developed a number of application GUIs using wxWidgets - you can see screenshots at http://ravenspoint.com/
IMHO, you should distinguish between designing a GUI and implementing it. Expecting to use the same program to design your GUI and to automatically emit all the code to implement the design is expecting too much.
A design program should be fast and simple. I recommend http://www.balsamiq.com/
Once you have settled on the design, then you can turn to the coding. Personally, I find that placing widgets on a panel using the wxPosition and wxSize parameters of the wxWidget constructors to be trivial - easier than trying to nudge widgets into their exact positions using the mouse.
The trouble with using some kind of form builder to emit all the code for a significant GUI is that you end up with a morass of automatically generated code that is hard to find your way around in. If the code has been handwritten, then you already know where everything is located.
wxFormBuilder but it costs money
wxFormBuilder is Free and Open source
Also Visual Studio is best for C++ coding in wxWidgets, but you will run into lots of issues on Linux due to the way Visual Studio handles a lot of things, like file names you have to take extra care for case sensitivity.
Also regarding the GUI, add the wxFormBuilder to the Visual Studio solution, add the file type handler to Visual Studio. Now just double click on it and add your dialogs, like you do it in C#.
Just add the generated code files to the Visual Studio project once and you are done.
It's very easy to use Visual Studio with GUI programming in wxWidgets.
Also don't forget to watch the CodeLite editor if you want to port on Linux. It is very much compatible with the Visual Studio projects and shortcut keys.
There is wxGlade and wxFormBuilder.
I don't know if there is another one, but the wxFormBuilder I know is free and open source.
You will find links to other tools on the homepage
of wxGlade (http:// wxglade.sourceforge.net/).
Most of these programs are able to output xrc files, which are are an XML representation of your GUI. It address the issue of complexity of the generated code but is not as powerful.
Yet personally I don't use any of these tools, except sometimes to see what it's going to look like before I do it but never to actually generate code.
I just finished doing a hello world program in both wx and fltk using the netbeans IDE. Microsoft Visual Studio WinForms or MFC was much easier than either. I needed cross platform capability so I could not use it for this application. I finished fltk in much less time than wx. The program was simpler, smaller, faster, and easier to write. Wx had pretty disjointed documentation and organization. Fltk was designed back in the "old days" when small fast and efficient was valued. That's probably why it seems "old" to you. I'm an old guy so it worked for me. YMMV
I wanted to learn to program and looked at both Java and C#. I decided to go with C# because it was so easy to just open a form and plop some buttons and text boxes on it. With just one download, C# Express got me going.
From what I saw with Java that couldn’t be done. At least not without downloading and configuring other software. All of which I found no easy instructions for. But I really wanted to learn Java.
I really don’t want to learn how to create UIs AND a new language. I’d rather just to concentrate on the code itself. Is there an easy way (like C# basically) to create Java apps?
Are you talking about a GUI builder?
There are many GUI builders out there. Some IDEs like Netbeans come with nice GUI builders for Java.
There are options in the Java community for 'one-stop downloads' like you mention. They are out there, they're just not as public as Visual Studio is. EasyEclipse is one of my favorites.
I've done a fair bit of work (> 4 years) on both platforms and the biggest difference I have found is not so much with the languages per se, but with the whole development environment. Specifically:
In .Net (be it ASP.Net, C# or VB.Net) the examples you find on MSDN or elsewhere tend to just work without a whole lot of tweaking, and the documentation is more reliable, whereas Java examples - especially the open source ones - often don't work out of the box and the documentation (yes, Apache Slide and Shindig - I'm looking at YOU!) is sometimes non-existent.
Having said that, the sheer amount of choice for plugins, libraries and the like for the Java platform is enormous, which is unsurprising considering its (largely) non-proprietary nature.
It seems to me the best and easier way to get what you want is to use Netbeans (JDK 6u14 with NetBeans IDE 6.5.1 Bundle).
It has both the JDK and the IDE in one download. And it has a easy and very good GUI builder.
Java is a very good platform and as you said it is easier to create cross platform applications, however, don't except this from the Desktop UI which, although still cross platform, not always gets right on all platforms with out modification.
You would have to add some code specific for each target desktop, but definitely that's a lot easier than write three different application ( One in Visual C#, other in GTK, and other in Cocoa )
I been learning to program in C# for a few months, but recently I signed up for a course which required Java. So I started playing around with java, first tried Netbeans then Eclipse.
I'm kinda a computer programming noobie (background mainly in web design) so take my perspective as a student. After messing around with Java for a bit i still prefer C#. While both are excellent the factors that tipped C# in my case are as follows
Easier documentation and a large variety of easy to view Video Tutorials, yes I know netbeans have a very large collection of video tutorials as well, they are encoded at such a terrible resolution and bitrate that they are largely unwatchable
Slightly easier to learn, maybe it's cause of the IDE or the syntax, but I found C# easier to pick up.
More functionality exposed right after using the IDE, you will find more controls in visual studio than compared to Netbeans. Eclipse was quite confusing for a noobie like me wading through it's massive plugins.
I think the only thing java has going for it, is that it's supported on more platforms. Though Mono is making up for the linux and Apple side so i guess it's not that bad. Either way they are both extremely productive environments, just in my humble noobie opninion C# is just slightly more intuitive to pick up.
The ability to learn to program in one language or another should most certainly not be based upon how to drag and drop GUI controls, especially since that measure is irrelevant to the language itself.
Side note: Java and C# are so similar that you'll pretty much be learning both as you go regardless.
I'd have to agree with dxmio, I switch back and forth between c# and java quite often. The two languages are quite similar.
The best way of learning programming .. is to write code!
If you know your way around Java, It's a mater of syntax to learn C#.
Programming is just as much a way of thinking in code, as knowing a language.
Personally, I didn't start with GUI. I started with BlueJ, a free "learning" compiler, for Java code.
No programmer in the world knows any language 100%. Their all sitting in their office, and playing with stackoverflow and google all day. Remember, Google is your best friend! (May be a bit of caffe too !)
Reminder: The best way to learn to write code, is to write code! If it's C, C++, C#, Java, PHP, Python or whatever you prefer, it's a matter of framework and syntax.
If you have Java in your browser, all you need is the latest Eclipse bundle.
I would suggest the Java EE edition for your platform from http://www.eclipse.org/downloads/
It appears that there are video tutorials starting from scratch at http://eclipsetutorial.sourceforge.net/totalbeginner.html
Using Netbeans, you can create Java based Swing GUIs pretty easily. Netbeans comes with a pretty nice GUI builder.
If you learn how to program in Java, I don't think it would really be that much of a stretch to create Java Swing applications from scratch. It's just a matter of learning the Swing libraries.
Not being from a .NET background, I can't comment on learning C# GUIs, but from my experience Swing was very easy to learn and it helps A LOT to understand the code underlying what the GUI builder in Netbeans generates.
I decided to go with C# because it was so easy to just open a form and plop some buttons and text boxes on it.
You can do this using builders in either language without writing any code.
With just one download, C# Express got me going.
Netbeans is the same deal for Java.
From what I saw with Java that couldn’t be done. At least not with out downloading and configuring other software.
True, you cannot develop Java with C# Express and you cannot develop in c~ using Netbeans. You do need to install two pieces of software.
All of which I found no easy instructions for.
I suggest you try http://www.google.co.uk/search?q=netbeans+gui+builder+tutorials 55,100 hits or http://www.google.co.uk/search?q=java+gui+tutorials 1,340,000 hits
But I really wanted to learn Java.
It doesn't appear you want to actually write any code or install more than one program at a time. You will find that learning to program in a language will be asking more from you than this.
Was I missing something?
Quite a bit I imagine.
I really don’t want to have to learn how to create UI’s AND a new language.
You can use a GUI builder to layout your windows, but if you want your program to do something useful, you will have to do some programing in a language.
I’d rather just want to concentrate on the code itself.
That appears to contradict everything you have just said. You can't concentrate on the code without learning the language.
Is there an easy way (like C# basically) to create Java apps?
To write apps that do something useful you are going to have to learn how to program and at least one language. I suggest you also learn how to debug and profile your program.
i found this for designing java winform application for you .
please check out
www.formdev.com
JFormDesigner™ is a professional GUI designer for Java™ Swing user interfaces. Its outstanding support for JGoodies FormLayout, GroupLayout (Free Design), TableLayout and GridBagLayout makes it easy to create professional looking forms.
I'm a little ashamed for asking this, because, you know, I've been very anti-MS for a long time. I have been fortunate enough as to make a living outside Visual Studio. As I grown older there are "some" things I would like to try, and to be very honest, this Q&A site has inspired me and I realize that VS and Windows Development doesn't suck that much. Hey, after all C# was designed after Java, and now Java is copying back some features from the child language. And Windows vista is the first decent version since windows came to light.
Anyway, to any +3,000 user in the audience, you may delete all the above crap and keep the following:
Do you have, links, resources, tutorial aimed to learn Windows development coming from strong Java background?
I'm very interested in Windows manipulation (that is the actual window, the frame, get the name, get foremost app etc., resize it programatically, etc.) and in Windows Search API among other minor API's. My interest after all is to integrate them with my Java apps through JNI or JNA.
I've read many tutorials and links over the MSDN, and I actually understand the API it self. I've grabbed a copy of C# and C++ Express and actually got some basic samples running.
My problem is I don't get the big picture of the whole architecture (because, well, it is big). The classes have hundreds of methods, and it not that clear to me who calls them. (I had this same opinion when I first look at the Java's Javadoc API.) I don't know some basic common objects, for instance HWCD (or something like that) that it turned out to be the very window handler, but every single tutorial I read give that for granted (as if WHCD or what ever it is, was a very descriptive name).
I don't know exactly the difference between Win32, COM, COM+, DCOM, Windows SDK ADO, and some other technologies. I mean, I know them at some degree and by common sense, but while reading the tutorials or the API I get confused. I've tried to grab some "beginner" tutorials, but they are aimed for absolute 0 programmers using Visual Basic (yiak! , THAT was the main reason I kept away from MS for so many years in first place.)
I do understand .NET framework, managed code, unmanaged code, C# basics, CLR and related stuff, because well, they are SO similar to the Java platform that it is almost transparent.
So, after all my rants and honest opinions about MS development:
What's the best way to learn Windows Development for a non absolute beginner (in programming) but absolute new to Windows APIs itself? What would be a good path?
The Petzold is your new best friend, and MSDN is your new Javadocs. Make sure you have a good understanding of C before you dive into it though. The Forger has a great beginner tutorial too if you're interested. A great place to hang out while learning is #WinProg on efnet irc, plenty of win32 gurus ready to help.
I'm going to suggest an alternate path (with less resistance). Have you looked at WPF yet? It's the new GUI toolkit that lets you create sexy interfaces (like those found in Vista).
That may be enough to keep you interested while easing into more advanced development. From there you can jump into the jungle of the Win APIs (if you choose).
Just a thought, as that path would be more interesting for me. Your mileage may vary, of course.
I strongly recommend getting yourself a copy of "Win32 Programming". It explains the basic DNA of WINDOWS - and this is valid if you are programming with the old C++ win32, the new C# WinForms and also the future Windows Presentation Foundation.
In a nutshell, a Windows program consists of a WinMain. When first started the app registers its window class with the system, initializes and then starts a message loop which continues till WM_QUIT is encountered. The system (OS) keeps pumping messages like keyboard or mouse click etc to the message Q of the application. In Windows, at any point of time there is only one active Window - so the OS knows whom to send the message to.
Well things like these are described in detail in the above book.
COM (COM+, DCOM) are not really related to Windows. When Word, Excel became popular and it was required to be able to access Excel from Word (viceversa) they came up with the AcitveX technology which is kind of the root for COM etc. You can get started with "Essential COM" by Don Box.
One warning: in the Microsoft world, there are two ways to program - to go the boiler plate way (write everything yourself) or use frameworks (MFC, ATL-COM....). It is recommended to do a bit of boiler plate so that you know the basics.
Having made the same conversion a year ago I can say that there's a lot of literature specifically for learning c# from a Java background. This was my first into which I found really useful for learning the important differences / features of C#:
C# from a Java developer's perspective
And there are also books which may be worth a look at (google 'c# for java programmers'). As JohnT said MSDN library is the equivalent of JavaDocs API, but I found it really frustrating to use. The best way to learn is to grab a copy of Visual Studio express and start playing around. Use intellisense to explore classes and methods. Find a small program you wrote in Java and try to reproduce it in C#. Start with simple problems, use google to solve them. You'll find it hard for the first week, but trust me, it will come to you surprisingly quickly!