dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 26

Thread: What should one learn in C++ to develop programs like yahoo messenger ?

  1. #1
    Join Date
    Sep 2017
    Posts
    25

    What should one learn in C++ to develop programs like yahoo messenger ?

    I know some programming which i did in college , have not done any advanced studies other than some html javascript php mysql .

    And applications wise i can't think of much other than some login / logout /file upload etc .

    So i was thinking about learning C++

    What are all the things i should learn to do a program like Yahoo messenger ?

    Thanks

  2. #2
    Join Date
    Feb 2017
    Posts
    359

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    Quote Originally Posted by mandhabudhi View Post
    So i was thinking about learning C++

    What are all the things i should learn to do a program like Yahoo messenger ?
    Learning a programming language and learning how to programming a specific application are different things. The language is a tool you swing differently depending on what you want to build and for that you need application specific knowledge.

    To write a Web application you need to know how the Web works obviously but some languages have more support for it than others, not in the core language itself but in the form of additional libraries and frameworks, and I have the feeling C++ isn't among the most popular languages for Web programming. C++ is a systems language alright but it tends to require more deep detail work than the alternatives.

    Anyway if you are going to use C++ you probably will want a framework to make life easier and I think Qt maybe could fit the bill,

    http://doc.qt.io/qt-5/topics-network-connectivity.html

    There used to be a free version of Qt and I looks like there still is,

    https://www.qt.io/download

    Qt isn't the only option and I suggest you do your homework carefully before embarking on a project that's going to be quite complex. Search the net and read books. Then form a view of what fits you best and go for it. Again C++ may not be the optimal choice for you so also consider for example Java and Python.
    Last edited by wolle; August 30th, 2018 at 04:00 AM.

  3. #3
    Join Date
    Sep 2017
    Posts
    25

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    Thanks a lot for the detailed reply ,

    I have seen examples of Server client chat programs coded in C++ , Microsoft foundation class

    If i am right , one can code Windows GUI program with Microsoft foundation class library

    From the information i have read , it is usually single threaded and multi threaded , i am not so sure what that is right now .I have seen example code of that .

    Even i myself have not much idea why people choose C++ for web programming , when i was in college i have seen people creating web applications with C++ for our college projects , while i chose HTML , javascript , php and mysql .
    Because i spent a lot of time behind the internet and those languages are the ones i see on usual basis .

    I would love to see a few examples first about what can be done with C++ and web programming .

    This is first time i have heard about the QT framework , i will research about that a bit later because it does not look like something that is right for my level right now.

    First there is C++ and Console based programs

    Then there is C++ and windows gui based programs written with the help of microsoft foundation class .

    Then there is C++ and web programming , which i don't know anything about right now .


    Can you suggest a good book about Web programming and C++ ?

    I was thinking about buying this book "Getting Started with Visual C++ 6 with an Introduction to MFC " - deitel

    I am not sure if it has information about C++ and web programming though .

    I guess that is what i should be looking for , Let me see if i can find a good book of C++ and Web programming

  4. #4
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,802

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    While it might be a fun academic excercise, it wouldn't be advisable to code a production app in c++. It would be like 1990's technology to the 2018 party.

    This isn't a slam on the c++ language, it's just that the frameworks for the web have evolved in the other languages and haven't in c++.

    If you goal is to learn, that's one thing, but if the goal a to write a production level web application then you would be better off hosting in IIS on Windows or the equivalent in linux using web frameworks in C#, python, java, ruby or so on. In addition, there are cloud platforms like Microsoft Azure and Amazon Web Services that make web hosting in the cloud simple.

    There are lots of options for web programming, but doing it in c++ isn't high on that list.

  5. #5
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,479

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    I agree with Arjay and Wolle - although a c++ devotee, I wouldn't think of c++ as my first choice for writing a production web application. Whilst it could be done (just about any program could be written in c++), that doesn't mean it should be. IMO the only reason c++ should be considered for a production web application is if you know c++ very well and there's no other more suitable language available.

    If, however, you just want to learn c++ then that is different - although I wouldn't choose a web application as an exercise.

    I was thinking about buying this book "Getting Started with Visual C++ 6 with an Introduction to MFC " - deitel
    Not recommended. The c++ language evolves approximately every 3 years. MS Visual c++6 was released in 1998 - at the same time that the first c++ standard was issued c++98 - and isn't compliant. Since then there has been c++03, c++11, c++14 and the current standard c++17. The new c++20 standard is now in progress. A c++17 program looks quite different from a pre-c++98 program. Hence I strongly suggest that if you are going to learn c++ then you learn the current standard. That pretty much rules out any book published earlier than late 2017.

    For MFC, there really aren't any new MFC books. The 'standard' is 'Programming Windows with MFC' by Jeff Poise - but that's from 1999. However, you might want to consider 'Beginning Visual C++ 2013' by Ivor Horton which covers c++11 and MFC. Note that the current version of MS VS is VS2017. You could then update your c++ knowledge from c++11 to c++17. Also note that many 'new' MFC books are not and are based on MS Visual c++ 6. Be aware.

    PS If you want to stick with c++, then consider c++/cli which is a MS c++ variation that enables c++ programs to interface with the .net framework. Note, however, that this c++ language has some differences to the 'standard c++' language.
    Last edited by 2kaud; August 30th, 2018 at 11:56 AM. Reason: PS
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2017 (15.8.9)

  6. #6
    Join Date
    Sep 2017
    Posts
    25

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    Thanks for the reply Arjay , 2kaud

    My goal is to learn C++ , the only things taught in colleges are simple console based programs .

    I want to learn a little bit more so that i can try to program Windows Gui programs with C++ .

    I found two examples from github in C++ that is related to Server client chat programs ,

    https://github.com/hassanyf/Simple-S...d-Chat-Program

    https://github.com/robelsharma/MultiClientChatRoom

    Both are done in C++ .

    I was thinking about studying this code to expand the program like a yahoo messenger chat program , I know its difficult and basic programming skills alone is not going to help .

    Which is why i was thinking about studying C++ again ,

    I have a couple of books including the one 2kaud suggested , Beginning Visual C++ 2013' by Ivor Horton

    When i was learning web programming this book has helped me a lot , because it has lot of practical examples .

    Chapter 26 , Page 653

    https://doc.lagout.org/programmation...4-12-14%5D.pdf


    I like to know more about the account and profile creation and all in C++ .

    I am looking for such a book .

    Thanks

  7. #7
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,479

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    github hassanyf are linux console programs

    github robelssharma are MFC programs. They use the MS Winsock library to enable communications. See https://docs.microsoft.com/en-us/win...s-start-page-2

    The .pdf url given is for a different book entirely??

    What you need with c++ are essentially different layers and different libraries.

    There is the basic language itself.

    Then there is the gui library (if you don't want to use native MS WIN32 API - and you really don't!). This is something like MFC, QT, FLTK etc.

    Then there is the network library eg Winsock, qt

    Then there are libraries that deal with XML etc etc etc.

    To do something like what you're looking at, it's not just learning the c++ language - its also learning the various libraries/frameworks etc that are also required as well. Learning the libraries can be as challenging as learning the c++ language itself. Don't forget, the c++ language only deals with console programming. Anything else has to come from either libraries you create yourself (don't!) or from 3rd party libraries/frameworks - which can be either public -domain (such as on github) or commercial paid-for libraries (or a combination of both depending upon features such as qt).

    I would suggest you look at the free open-source version of qt. That has the various libraries etc I think you'll need. See https://www.qt.io/download
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2017 (15.8.9)

  8. #8
    Join Date
    Aug 2006
    Posts
    232

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    I think you should consider C++ if you need performance, or for a traffic intense website. As a compiled language it will run faster than interpreted ones.

    I recommend a toolkit called Wt:

    https://www.webtoolkit.eu/wt/doc/tutorial/wt.html

    There are also alternative methods, for example you can use a compiler called Emscripten to automatically turn your C++ code into high-efficient JavaScript code.

    https://kripken.github.io/emscripten....html#tutorial

  9. #9
    Join Date
    Sep 2017
    Posts
    25

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    Thanks for the reply 2kaud , TabularX

    One last question ,

    I already have these books with me .

    The Complete Reference C++ 4th Ed

    Beginning Visual C++ 2013 - Ivor Horton

    Programming Windows with MFC - Jeff Prosise

    Can i learn to program a small Windows GUI messenger with those books alone ?
    Last edited by mandhabudhi; August 30th, 2018 at 06:07 PM.
    declare integer line firstNumber, secondNumber, sumOfTwoNumbers;
    scanf("%d %d", &firstNumber, &secondNumber); // scanf() function is used to read character from keyboard
    printf("Enter two integers: "); // printf() function is used to print the “character ” onto the output screen.

  10. #10
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,802

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    Quote Originally Posted by TubularX View Post
    I think you should consider C++ if you need performance, or for a traffic intense website. As a compiled language it will run faster than interpreted ones
    Possibly in theory but in practice, the code that is frequently accessed will be compiled and cached. Furthermore, it's going to be tough to beat the performance and scalability of a server farm and the ease of deployments that modern web application frameworks provide. Attempting to do the kind of things in C++ that the modern web frameworks have built-in, is going to take an enormous amount of time. Part of the programming adventure is picking the correct tool for the job.

  11. #11
    Join Date
    Sep 2017
    Posts
    25

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    The good thing is i can learn about a lot of things if i try to learn C++
    Console programs , Windows GUI programs , Database programming , Web programming , Game programming

    Which is why i want to take this language a bit more seriously
    declare integer line firstNumber, secondNumber, sumOfTwoNumbers;
    scanf("%d %d", &firstNumber, &secondNumber); // scanf() function is used to read character from keyboard
    printf("Enter two integers: "); // printf() function is used to print the “character ” onto the output screen.

  12. #12
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,119

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    Quote Originally Posted by Arjay View Post
    Possibly in theory but in practice, the code that is frequently accessed will be compiled and cached. Furthermore, it's going to be tough to beat the performance and scalability of a server farm and the ease of deployments that modern web application frameworks provide. Attempting to do the kind of things in C++ that the modern web frameworks have built-in, is going to take an enormous amount of time. Part of the programming adventure is picking the correct tool for the job.
    Well ... if you really need performance, you need C++. Websites like Facebook switched parts of their codebase to C++ years ago to give them tremendous speed improvements and power consumption improvements. If you are running that kind of websites, even improving power consumption by just a few percent can mean saving millions of dollars per year.

    However, I agree, for most websites C++ is not recommended. I myself will not use C++ for building my websites.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  13. #13
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,119

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    The "Beginning Visual C++ 2013 - Ivor Horton" book will teach you how to write a GUI application in MFC.
    Keep in mind though that MFC is an older technology. You will usually not use it for new projects, but there is a lot of code written that uses MFC. A lot of companies have older codebases that use MFC for their GUI.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  14. #14
    Join Date
    Feb 2017
    Posts
    359

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    Quote Originally Posted by TubularX View Post
    I think you should consider C++ if you need performance, or for a traffic intense website. As a compiled language it will run faster than interpreted ones.
    This is an urban myth that never seems to go away.

    It's not part of the C++ specification how C++ is supposed to be executed. A C++ program can be statically compiled before runtime, interpreted at runtime and just-in-time compiled at runtime and this is true for most languages.

    There is no evidence that programs running with just-in-time compilation (JIT) performed by a virtual machine (VM (*)) such as JVM or CLR are slower than statically compiled programs. On the contrary, a VM can perform analysis of the running program and base JIT on knowledge that isn't available to a static compiler.

    Furthermore a VM offers some relief for the application programmer of having to deal in detail with overwhelmingly complex runtime processes such as thread and memory management.

    Also the core parts of most VMs are written in C++ and statically compiled. This means that for example Java and C# programs running on a VM can be thought of as partially written in C++. Using C++ from the ground up effectively means the application programmer is charged with writing parts of a VM.

    I agree with Arjay in #10 that there's no way you can outdo modern Web frameworks by rolling the same in your own C++ program even though it may be statically compiled.

    This doesn't mean I wouldn't prefer C++ for Web programming myself. It's just that if time-to-market is factor and I'd bet my house on a project I'd think twice.

    (*) I'm using the term VM in a broad sense to denote the whole dynamic environment you typically find in VM based runtime systems.
    Last edited by wolle; August 31st, 2018 at 04:27 AM.

  15. #15
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,479

    Re: What should one learn in C++ to develop programs like yahoo messenger ?

    The Complete Reference C++ 4th Ed
    That was published in 2002 and only covers c++98. IMO I wouldn't use it as it doesn't even cover c++11 - there were huge major changes to the c++ language from c++98 to c++11 (c++03 was only a very minor update for c++98). If you want a c++ reference book have a look at c++17 Quick Syntax Reference by Ollson.

    However, there are internet resources available. Have a look at

    https://www.learncpp.com/
    https://en.cppreference.com/w/cpp

    and don't forget the MS web site
    https://docs.microsoft.com/en-us/
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2017 (15.8.9)

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)