Php VS Java for Multiple file uploads simultaneously - java

Requirements:
1) Only multiple Images, and small files will be uploaded.
2) Upload progress tracking.
3) No flash, no prebuilt library, trying to learn here.
Problems:
I tried PHP before, but the problem was APC allows only one file to be tracked at a time, so i cannot upload multiple files at the same time, like in rapidshare or mediafire which I am looking to implement. So i looked into Java, And it allows me to control file upload section completely down to the bit patterns and I know facebook uses that too so sounds like a good option.
So what do youll suggest me to do? Continue with PHP, some alternative or shift to JSP? If I should continue with PHP how?

What do you know better? What is the rest of your web site built in?
Those are better questions to answer than trying to figure out which language is better for this task. (They'll both work fine.)

Related

Folder upload over the network with Absolute path [duplicate]

I need an easy way to allow users to upload multiple files at once (ie I need to allow a user to upload a folder). I do not wish to put the burden of zipping on the user.
I would prefer to avoid Flash or variants if possible. I'm looking for a straight javascript / HTML solution if it is possible. Please note, this rules out the answers at: What is the best client side browser library to upload multiple files over http?.
You won't be able to do it with just HTML and Javascript. I'd recommend trying Fancy Upload, a MooTools plugin for multiple file uploads. It uses a mixture of JavaScript and Flash, but degrades gracefully. It works with all major browsers including IE6 and there is also a Flash 10 compatible release available for download (though the demo hasn't been updated yet).
Update (2012-11-26):
Multiple file uploads are possible with valums or blueimp file uploaders.
For recursive directory uploads, your best solution is using Chrome 11's new folder upload API. It also seems to work on Firefox if you use a vendor prefix.
With Firefox 42 and Edge having implemented the new directory upload proposal we'll finally able to do cross-browser directory uploads. The APIs are nasty enough that you may want to check out my wrapper, uppie.
If you're avoiding Flash (and presumably Java?) the JS/HTML-only solution still requires single-file inputs, but essentially you attach an onchange event to your input, adding a new input to the DOM whenever a file is selected.
Multiple file uploads are possible with valums or blueimp file uploaders.
For recursive directory uploads, your options are more limited:
Your best solution is using Chrome 11's new folder upload API. It also seems to work on Firefox if you use a vendor prefix.
This is also possible cross-browser with a Java applet. However the % of folks with a JRE installed has gotten pretty low these days (< 70%)
This isn't a pure js/html solution. As EndangeredMassa has pointed out, it's not possible. In fact, this idea is an IE/Windows only solution. I don't recommend it, but it can work.
So, all disclaimers aside ...
Many years and several employers ago, we used to do some client side stuff that instantiated the FileSystemObject. It would iterate through each of the files and pass them through to the server one at a time. Can't remember the details of how we did that :o(
Anyway, this usually meant that the client box would need to have to add the site to the list of trusted sites and give trusted sites a bunch of permissions that are turned off (for very good reasons). Stuff like the ability to Initialize and script ActiveX controls not marked as safe. That kind of thing.
I know that this isn't a perfect answer, but it could point you in the right direction.
FTP? And if necs, wrap in Java Applet, ActiveX or whatever you want.
If not, although you don't want flash, SWFUpload is quite cool, you may want to reconsider it as a decent option.
Here is pure JS solution using ExtJS library

Can i create Web App to be used on smart-phones without internet ? How?

I want to make cross - platform app which could be used for different smart-phones, and been advised to make 'Web App'.
Can 'web app' work without internet?
How to do it, which programing language to use?
thanks
Oh sure. Bundle all your HTML, JS anc CSS with your app, and have a thin Java/Android app over these assets. If you are not making any calls to fetch or show external HTML/pages, you don't need internet.
Most likely no.
While it is possible to run "web apps" without access to the internet (you can simply execute Javascript locally from some browsers), it would be
(Subjectively) not particularly useful.
Not supported by many devices, whom (like the iPhone) do not allow the storage and execution of arbitrary, non-native code on the device.
However, some frameworks do exist that hold the idea of "web apps" can be a distribution model. For example, PhoneGap allows you to code in HTML5/Javascript, and distribute your app to multiple platforms.
Yes, it can work offline once downloaded from web. Use just any regular programming language for web application development. If you are good at programming, I recommend ruby-on-rails or ASP.NET MVC with Jquery mobile.
You might want to look into frameworks like:
PhoneGap: http://www.phonegap.com/
jQuery Mobile: http://jquerymobile.com/
GWT Mobile: http://code.google.com/p/gwt-mobile-webkit/
Your question is very broad so it's hard to give a useful answer. Essentially when making a web app you'll normally be working with javascript, css, and html... though there are frameworks which will let you write your app in Java/Python/Ruby and then have those languages create your app for you. Keep in mind this is mostly all front facing stuff though. The actual web app will still need to have a backend written in a programming language that you understand (hopefully).
Good luck :).
Check out the jQuery Mobile API - I started using it recently and it has proved to be a viable option. Check this out.
https://developer.mozilla.org/en/Using_Application_Cache with an application cache your Web App can be used offline. It will cache the resources you specify to disk.
So you can write a Javascript + HTML webpage/app and use it both on and off line.
You can cache/store:
HTML
CSS
Javascript
Images
GET Requests

A java program to search in a certain website

I want to write a Java code to parse a certain website. Each result in the website appear in a specified URL.
How can I start? Is there a good library to use? Could I benefit from your experience in this field?
Search for "web crawler" and you'll find many examples (e.g. Crawler4J or Crawler), how to solve this.
Besides Java, you'll often stumple upon Python when it comes to grepping stuff from web pages - I'm not a Python guy, but it seems to fit for the task.

FOSS java library to generate *.mobi ebooks?

Firstly there is an almost identical question but the answer is not really satisfactory.
Is there a Java or Ruby library for generating MOBI ebook documents?
The answer basically gives a link to amazon and discusses using command line tools which is not really satisfactory for a web app. I want a regular jar file w/ an api that i can invoke without any nasty process invocation.
Does anyone know of a FOSS library that provides this functionality ? I would rather simething like ITEXT that allows me to build the document and then writes the mobi file rather than something that converts an already ready PDF into the MOBI.
The best I've been able to find is a ruby library called KindleR. https://github.com/josh/kindler
I've only used it to convert basic HTML pages to mobi with pretty good success. I've never converted anything with more complicated formatting, so YMMV.

Continue with PHP or move to Java Framework

I'm building a website for my friend's startup.
I'm currently building it on PHP, MySQL, Apache. Everything is going pretty smooth till now, but one of my friend recommends i move to a Java framework because that'd be better when the site becomes bigger.
I don't have any Java Knowledge and I have adequate knowledge of PHP but I'm a fast learner
Should i continue with PHP (can PHP be used for big sites?) or should i move to a Java Framework?
Any suggestions please.
PHP can be used for big sites. Take a look at Facebook. End of story...
When someone says something like that, you need to have them justify what they are saying. PHP is scalable and versatile. Java has it's strengths and weaknesses too, just like any other programming language.
Since you are a novice in PHP, you probably won't reuse much of the code that you are using to build the initial site. I know you plan to, but the likelyhood that you will is very slim. Go with what you know.
PHP has been used by a plethora of sites. Google, Yahoo, Facebook, etc, etc all use some php for all their sites.
I think regardless of whether you go with PHP or a Java solution you're going to have to learn a new set of frameworks/libraries. If you don't have experience building anything more than a toy website (including any you've done through education) there will be plenty to learn from both paths.
Research some frameworks for both PHP and Java and make up your own mind based on what you've read. If it's such a long project you'll have plenty of time to familiarise yourself with whichever option you choose.
Everything for a website is possible with php. No need to worry. we can make heavy sites with php in a easier way then java framework. You can use php frameworks like zend framework, codeigniter. They are scalable and easy to learn have lot of Components (libraries). And provides client services to bigger sites like twitter,amazon,yahoo etc.
:)
At least 1/3 of the top 20 sites on the web are using PHP in one way or another. Languages used by the rest include Python and Ruby. I don't see that any of them are using Java.
PHP is fine to use, ive made websites before using PHP...
Id suggest you stick with PHP but challenge yourself and expand your knowledge.
Yes. Big sites can be build using PHP. Examples are Digg.com and Facebook (which compiles to c++, but indeed).

Categories