Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Python vs. Java, which is better at dealing with XML database?

  1. #11
    Join Date
    Nov 2010
    Beans
    162

    Re: Python vs. Java, which is better at dealing with XML database?

    Quote Originally Posted by ricegf View Post
    Y'know, on re-reading your original posts, I think your architecture is actually client-only - you're just downloading an XML file from your desktop to smartphone via (say) a file manager so you can view the data on the go. Right?
    Exactly! The program on my smartphone will be just a "viewer". And it won't communicate with desktop end through the Internet. It will synchronize with the desktop part either through Microsoft Activesyc or I will sync them manually.
    Last edited by zhaotianwu; July 16th, 2011 at 06:10 AM.

  2. #12
    Join Date
    Dec 2006
    Location
    Texas USA
    Beans
    29
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Python vs. Java, which is better at dealing with XML database?

    Do you think this is feasible or just a crazy idea?
    Sounds like a great idea to me!

    Why do I still need Python on the server? Couldn't I just use Javascript both on my desktop and on my smartphone? Does Python provide any benefit that Javascript doesn't?
    Javascript isn't used much for programming servers on the open Internet, so Python or Java might be a better choice if you wanted to do that - the latter two have excellent frameworks (class libraries) that do much of the heavy lifting for you, and you'll find more forums and people who will give tons of advice (*self-conscious pause*).

    But I now think that you're only doing desktop and smartphone versions of your application, and Javascript should be just fine for those platforms. And using Firefox to render your UI should work well and result in a highly portable app, too.

    NOTE FOR LATER: Once your code is doing useful things, and if you're willing to share it with others, consider learning to use a site such as bazaar or github. This is called "configuration management", keeping track of your earlier versions with very little effort while also allowing other programmers to see and suggest changes ("patches") to your program. It's central to becoming a successful programmer, once you've got your first program up and running. But code first.

    I don't quite understand this. Why is Jython bad for sharing code? Isn't it also an open source implementation of Python? Would you please explain a bit little more? Thanks.
    That was badly worded on my part. What I meant is that, if you wrote a Jython program to share with other Android users, and if they would need to separately install Jython on their phones to run it, that would be far less convenient that writing a Java or Javascript app that would install seamlessly with no additional effort.

    Disclaimer: I'm not personally familiar with Android package management, so I'm not sure that you couldn't just declare a dependency to Jython and all would be well, as you could in (for example) Ubuntu. The google results implied getting Jython onto Android required some manual effort, and that would discourage users from trying your program. But if it's just for you and a friend or two, it's not a big deal.

    Darned near every computing device has Javascript, though, so you're set.

    I've seen someone describe Javascript as "superglue", does it mean Javascript relies even more heavily on scripting?
    Javascript is even more focused on scripting than Python, but it's a full object-oriented language and probably among the 10 most popular (with Java, C/C++/C#/Objective C, Python, and a couple of others - google "TIOBE Programming Community Index" for one such measure if you're interested). I'd encourage you to design your Javascript according to good object-oriented principles, and your app should work well.

  3. #13
    Join Date
    Nov 2010
    Beans
    162

    Re: Python vs. Java, which is better at dealing with XML database?

    Quote Originally Posted by ricegf View Post
    Sounds like a great idea to me!
    Hi ricegf, Thank you very much for your encouragement!

    1. Mozilla Firefox is written in C/C++, JavaScript, CSS, XUL, XBL. If I really want to play with Mozilla Firefox (may even modify it) for my project quick and dirty but still don't have a lot of time to learn everything, can I get away with just learning Javascript and XML? Or at least I should try to learn CSS as well? I appreciate your advice.

    2. Any comment on some dialect of Javascript, e.g. coffeescript?

    Thank you!
    Last edited by zhaotianwu; July 27th, 2011 at 09:57 AM.

  4. #14
    Join Date
    Apr 2008
    Beans
    507

    Re: Python vs. Java, which is better at dealing with XML database?

    Quote Originally Posted by zhaotianwu View Post
    2. I want my program (a CRM & decision support system) capable of replacing much of Microsoft Office Suite features, like calendar, schedule planner, journal, email storage, etc, based on a business logic database. Can Javascript's class libraries allow me to program all these features? Since it will involve a lot of "drill down" features,
    JavaScript (the language) does not provide any UI widgets/libraries. Widgets are created by interfacing with the browser Document Object Model (DOM). For example, to create a non-standard button you may draw a box (DIV tag), colour/style it with CSS and make it clickable via a DOM Event/Handler. Unless you wish to get your hands dirty creating these from scratch, there are many toolkits which will do this for you ie. widgets and layout management and all things UI. For example, take a look at Sencha/ExtJS ... http://www.sencha.com/.

    Quote Originally Posted by zhaotianwu View Post
    is Javascript good at dealing with Vector Graphics?
    Look at Scalable Vector Graphics (SVG) which most modern browsers implement. Note: for IE it's v9+. Older IEs do VML. Again, there are toolkits which do the heavy lifting for you ... like this JavaScript one ... http://raphaeljs.com/.
    Go you good thing!

  5. #15
    Join Date
    Nov 2010
    Beans
    162

    Re: Python vs. Java, which is better at dealing with XML database?

    Quote Originally Posted by myrtle1908 View Post
    JavaScript (the language) does not provide any UI widgets/libraries. Widgets are created by interfacing with the browser Document Object Model (DOM). For example, to create a non-standard button you may draw a box (DIV tag), colour/style it with CSS and make it clickable via a DOM Event/Handler. Unless you wish to get your hands dirty creating these from scratch, there are many toolkits which will do this for you ie. widgets and layout management and all things UI. For example, take a look at Sencha/ExtJS ... http://www.sencha.com/.



    Look at Scalable Vector Graphics (SVG) which most modern browsers implement. Note: for IE it's v9+. Older IEs do VML. Again, there are toolkits which do the heavy lifting for you ... like this JavaScript one ... http://raphaeljs.com/.
    Thank you myrtle1908, this is very helpful.
    Dear ricegf, what is your opinion towards my 1 and 3 question, I'm very much looking forward to that!

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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