Upload a java/php/python.. application on Force.com - salesforce

I am doing a survey about cloud paltforms and I have the following the question:
Is it possible to upload a Java/PHP/Python/etc application on Force.com just like you can do with Google App Engine, Heroku, Openshift, etc.?
I looked at the Salesforce website but I couldnt reach a certain conclusion. If I understood correctly, you can upload the code on Heroku and then integrate the application with features of Force.com or something like that.
Could someone shed some light here? Thnx

Force.com has his own language to run custom code on server. This language is called APEX.
Apex is a strongly-typed, object-oriented programming language that
lets you centralize and execute flow and transaction control
statements on the Force.com platform in conjunction with application
calls to Force.com ​APIs. Using syntax that looks like Java and acts
like database stored procedures, Apex lets you add powerful custom
business logic to most system events, including button clicks, related
record updates, and Visualforce pages. Web service requests and
database triggers on objects can also initiate the execution of Apex
code.
More info in the official apex doc
But you can't upload to salesforce servers any kind of standard code like php/python. If you need to develop your own app using php/python/java + salesforce-api's you will have to upload/run this code on your own server.

Heroku and database.com are closer to what you're after. Heroku will let you upload you Python/Java etc. app and then you can easily connect it to Salesforce-style database.
By "style" I mean one in which you can still use this Apex language in triggers for example or expose pieces of Apex to be called via webservices. Such webservices could be used like "stored procedures" in classic solutions - if you'd want to keep part of the logic on the Force.com side rather than in your app.
Martin's answer is very good. If it's not immediately obvious - there's a "vendor lock-in". You can't run this Apex code anywhere else, only on SF server. There's no open source equivalent like LAMP stack for PHP, Tomcat for Java etc.
I think it will make sense for you to read these 2 questions from "related" sidebar: Disadvantages of the Force.com platform and
https://stackoverflow.com/questions/3363333/anyone-moved-off-force-com. They're a bit negative but for your pros/cons type of comparison should give you some highlights.

Related

Salesforce: is it possible to develop a web application on top of Salesforce

Let me start with a bit of background: I'm helping a non-profit organization that would like to have a browser-based application that is backed by Salesforce, but has very specific requirements.
I see Salesforce has a REST API that we can call, so we can develop a standalone application to serve the web pages they want and use the REST API to call Salesforce when needed.
I'm wondering if there is a way to host a web application directly on Salesforce; this way we don't have to have a separate application server. Any recommendations or pointers to documentation/open source products is greatly appreciated.
Yes, you can create services that will allow your app to hit Salesforce
Depending on the type of application, yes you can host it on salesforce using the Salesforce Sites feature, also you can develop and host your app on Heroku which is owned by salesforce and can sync data to and from salesforce using Heroku Connect, or you can build and host it on another service like AWS and connect via the REST API. You just need to investigate and choose the option that best fits your use-case. One thing to be aware of is that there are API limits (the number of calls you can make to salesforce in a rolling 24hr period). Depending the the needs of the app be sure to see if those limits will be an issue. Because if the app makes constant calls to salesforce that could be an issue. But there are things you can do to get around that, like caching.
Yes, both Force.com Sites and Site.com features allow you to host webpages on the Force.com Platform. The markup is stored in Visualforce Pages and can use Apex to access records in the Database. I have migrated multiple websites (including our company's www.mkpartners.com) to Force.com using Force.com Sites.
One thing to keep in mind is that you are limited to 500,000 views per month and the rendering of a page with images that are also stored on the platform will incur a single view for the page and a single view for each image. If you already have a very popular website, I wouldn't migrate. If you're a small business or nonprofit, then it should be fine.
Another thing to keep in mind is that dynamic functionality based on records in the database will not work during maintenance windows. There is the ability to upload a static version of your website to be rendered during these windows though.

How to access mysql database from android application in order to create login and logout using Java i.e., without php?

I have made the android app for my college. In that I have made the Login Activity page. Also, I have designed one web portal for my college consisting of the details of students such as their name, admission no., roll no, contact no. etc. using Mysql workbench. Now I want to access this Mysql database from my android application in so that I can login into the application using roll no. as the username and contact no. as the password.
I want to do this whole thing using Java and without php.
You may consider developing a Servlet to run on a container (e.g. TOMCAT). The Servlet (which is developed in Java) would access the database. Here you have an example of how this is done.
EDIT:
First, you need to add to your app the ability to send HTTP(S) requests. Plenty of examples in the Web.
Second, you need to deploy a Servlet container software product (I suggest TOMCAT).
Third develop a simple Servlet to handle post requests and access MySQL (again, plenty of examples in the Web, including some that you can almost copy-paste as-is).
Fourth, create a WAR file of the Servlet and deploy it into your Servlet container (if TOMCAT, under the folder webapps).
You will have to fine-tune configurations, but it should be straightforward.
Good luck!!!

What tool can I use to easily manage data within a cloud database (Azure/SimpleDB/etc)?

I need a cloud database as a back-end for a mobile app, most of them will do what I need, but I also need a management interface (ideally web-based, but could be a Windows client) that makes it easy to:
Add/edit data in the database (including cross-table forms)
Report on the database, ideally with dashboards/charts
So I'm wondering if anyone is aware of a web-based too that can be hooked up to one of the main cloud-database providers, that allows me to design forms and reports to manage the data in the database. My goal is to avoid writing all the forms and reports myself so I can focus efforts on the client mobile app.
Right now my "best" solution appears to be Microsoft Access (probably hooked up to Microsoft SQL Azure), and I cannot believe I'd have to sink that low. Save me from this depravity? Please? :)
I've been using SDBNavigator. It's a Chrome browser plugin. Works like a charm.
"SDB Navigator on the Chrome web store"
The App Engine datastore has built in datastore viewers (and editors). On the dev_appserver, this is accessible at /_ah/admin/datastore, and in production it's accessible through your app's admin console. Neither one lets you build forms and reports, though - reports are somewhat out of scope for most NoSQL databases.
If you're prepared to do some coding, you might want to consider Django, which makes constructing admin interfaces extremely straightforward.
If you're using SimpleDB, check out sdbtool. It's a Firefox plugin. Very simple app - never had a problem with it.
You can use SDB Explorer. SDB Explorer is world leading GUI to explore Amazon SimpleDB. It have many features like --
Upload My Sql data to amazon simpledb.
Supports interface for AWS IAM.
Export Domain.
Product support.
See more .. http://www.sdbexplorer.com/

Web Analytics & Stats

We want to add tracking statistics to a web application we are building but are pretty unsure of how to go about it. (i.e. clicks, pageviews, unique visits etc)
Does anyone have any articles on the best way to go about incorporating tracking data into an application ? i.e. javascript tracking or IIS etc ?
We want to add tracking in as a ASP.NET MVC module - but we are unsure as to the best way to actually get the data and essentially 'track' this information ?
If anyone could help out - much appreciated.
Edit: just to be clear, we want to do this in-house and present the stats to our users as an additional fee module?
You can turn on the logging for IIS and then use the SQL Server Report Server Pack for IIS. It comes with many canned reports for your sites stats and then you could take it from there with your own custom reports.
You could also just use log parser to get the stats into a SQL Server DB and then you could use SQL from their to analyse and roll your own app.
Either way, you could modularize this and sell it as an add-on to your customer base.
You could use Piwik, you just need PHP version 5.1.3 or greater and MySQL version 4.1 or greater. As they say in their website, "Piwik aims to be an open source alternative to Google Analytics."
They have a demo on the official website so you can see if it's what you're looking for.
Google analytics is a popular service. You just insert a bit of javascript on every page that contains your sites name and Google tracks the data and provides all the report on a handy web based dashboard.
It's not an ASP.net MVC module like what you mentioned, but it will certain track stats for you and will be a lot simpler to set up than trying to code or integrate anything yourselves.
I'd look at analytics to begin with and only branch out to something more complex if it doesn't meet your requirements.
klabranche provided a holistic answer in terms of using logs of web server. I think using web server log is a a great way to analyse data of your web application.
That being said, depend on your web application and the scope of your analytics, just relay on web server log is not a good way to.
As you may know, web log does not record users behaviors like clicking certain tabs which may not trigger a web server request. Obviously your web log has no idea whether users clicked that tab or not, this may hurt your analyse.
Another you need to know is browser cache, this may create another black hole in your data.
RECAP
If you want to do a holistic analytics, you need to use two approaches, one is JavaScrip tag, another one is web log. Since both of them have shortages, combining them together will give you a complete picture.
Hope this helps

Using the EPiServer Communities API from a console app?

I'd like to write a console or winforms application that will interact with the EPiServer database. Since I don't want to muck about in the deep inards of the database I'd like to use the EPiServer API.
However, all the examples are using the "CommunitySystem.CurrentContext" which is null when running outside the website.
Now, I'm going to transfer a large amount of data from a legacy system to EpiServer Community and I really don't want to do that from a web page but from an application I have a little more control of.
Is there any way I can use the API from outside the web context?
I'm not that familiar with the community model. But... I've had no problems at all running huge imports through a web form (or control). The key (besides having disabled execution and database timeouts) has been to run it through Internet Explorer on the site's server and have the site's domain name mapped to 127.0.0.1 in the HOSTS-file. It can run for hours and hours while logging progress to a table or text-file before sending the response.
My colleague Jarle figured out the last bits and blogged the whole process here So if you want to run the EPiServer API outside of IIS, that's the place to start. Works like a charm!

Resources