Click here to Skip to main content
15,868,104 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi Guys

I am about to start a new desktop app based on Node-Webkit(nw.js). I am planning to use angular for its well known capability. wanted to know more about the possibility of using TypeScript in same project. My App is going to use few node packages(including custom packages written in C++) to interact heavily with OS. Moreover the app need to support mac and windows and need to be distributed over internet.
As i am relatively new to JS world, please provide some expert comments.


Thanks
Vashisth
Posted
Comments
Sergey Alexandrovich Kryukov 18-Jul-15 8:39am    
Why would you use Web-related technologies for desktop application? And what's the purpose of Webkit? There are no just just "good" or "bad" ideas; everything depends on purpose; and you provided no justification for anything.
—SA
Vashisth121 18-Jul-15 11:12am    
Hi Sergey,
Thanks for reply. reason for using node-webkit is to make the codebase common for mac and windows. node-webkit is the only thing mandatory for me. However, not compulsory but i am thinking of using angular to get the inbuilt support for data binding/MVVM etc.
As far as Typescript is concerned, i have no idea except the fact that it helps in implementing some of the concepts of high level languages like classes, inheritance etc. and finally produces the plain javascript file as output.
Since most of my team members are coming from C#/C++, i thought of exploring it further.
as i mentioned earlier, this is my first project of this nature, i am not sure of many things.
could you please put some more light on this. for example what could be pros and cons for such choices.
Sergey Alexandrovich Kryukov 18-Jul-15 12:57pm    
All you answers is about platforms and, if I can say so, ease of use, but not about the goals of your code. Your "mandatory" or "compulsory" does not tell anything at all until you explain why. So, it's still unclear why using Web technology for a desktop application (why talking about multiple platforms if it's unclear for at least one). Not that it would not make sense in all cases, but rarely.
—SA
Vashisth121 18-Jul-15 14:02pm    
Goal of my code is to enable user's machine(through this app) to interact with our websites for download of some files on his system. these files will be on trail basis. once trial gets expired this program has to remove those files. this application will also be displaying few views to list the files based on their properties.

1 solution

Thank you for the clarification. After you explained the purpose, I can see that I see no sense in most of what you suggested. The files are downloaded using the class System.Net.HttpWebRequest or simplified class System.Net.WebClient:
https://msdn.microsoft.com/en-us/library/system.net.httpwebrequest%28v=vs.110%29.aspx[^],
https://msdn.microsoft.com/en-us/library/system.net.webclient%28v=vs.110%29.aspx[^].

If you needed to parse downloaded HTML files, I would advise using some HTML parser, first of all, Html Agility Pack, but I don't really think that sophisticated Web scraping techniques uses for hunting for different URLs will really be needed, because the sites are yours, so you could directly deliver (in any suitable resource) the URLs you client needs to use for downloading.

When you download the files, you may need to view some of them, so some Web browser would be needed to view, for example, HTML file, but WebKit could be an overkill. You can use any WebBrowser component for this purpose. And any specific use of JavaScript, TypeScript, Angular.JS sounds in a desktop application sound pretty much like absurd to me. If I missed something, I'll be grateful for your explanations.

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900