Some scenario with WCF - am I thinking good and where to start? - wcf

I was wondering where I can start looking for some introduction/help/tutorials to WCF?
My application scenario is that I want to write Windows Phone 7 app which can save/get data into SQL Server. I assume that WCF is the right choice. At first screen I would like to make some simple login page based also on sql table

I strongly suggest you to look at ASP.Net Web API. It embraces HTTP and can be consumed easily across devices and platforms.

Related

Single API for Web and Mobile

If I've Single API for Web and Mobile then how can accomplish following things.
1.In web I need to display 10 fields but in mobile may be 3 fields only ?
2.Basically we will have tight coupling on DB proc side as well if there is a change(Requirement) for WEB, then it could be hit Mobile as well ?
3.Testing -> May be lot of testing for all platforms ?
Simple solution is that you add a extra field into your API maybe call it channel, then use that channel field to indicate web or mobile channel.

Desktop application accessible by multiple users

I have a desktop application [Data Analysis and Report Generation] built in VB. I would like to make this application accessible to all the users in our corporation, from their web browsers. What is the best possible way to achieve this?
One way which I have thought is to write a simple web form that would take the input from the user and apply logic on the server and generate results. Again, the limitation would be at the output screen as it is the real time output being generated.
Any leads would be highly appreciated.
Desktop App is way different from web app. To allow multiple users, a web app is suitable. For this you will have to use several technologies.
The UI has to be build using html, css and javascript (like jQuery).
The back end, can be VB if you are doing working with asp.net or php etc.
For real time output, you'll have to use ajax to allow communication between a browser and sever without page refreshes
An ideal choice for the front end logic, would be to use a frontend framework such as AngularJs by google.
However, all this does have a high learning curve and is difficult to build something using all this on the first day or even week unless you already know most of this.

Real time data from VB.net app to web server

I'm fairly new to VB.net programming. I'd like some suggestions for methods/procedures for sending real time data from a VB.net app to a web server (asp.net) for real time display. My question relates to the best method to send the data from the desktop app and the best way to receive and handle the data on the server. I'm not asking for sample code, just some idea of what methods to research. I am currently using a text file upload method but I'm sure there is a more efficient way of achieving this. Thanks in advance for your help.
For sending data to the server, you may research about webservice or WCF.
http://en.wikipedia.org/wiki/Web_service
http://msdn.microsoft.com/en-us/netframework/dd939784
For retrieving data from the server to your ASP.Net application, you can research about AJAX.
http://www.w3schools.com/ajax/default.asp
http://api.jquery.com/jQuery.ajax/
If you are using the MVC framework for ASP.NET (which I strongly recommend over WebForms), MVC4 which has recently gone into RC mode features a very nice new web API:
http://www.asp.net/web-api
"ASP.NET MVC 4 includes ASP.NET Web API, a new framework for creating HTTP services that can reach a broad range of clients including browsers and mobile devices. ASP.NET Web API is also an ideal platform for building RESTful services."
It allows you to define quite simple methods on the server which work directly with your actual domain objects and it does the work of returning data in an appropriate content type (e.g. JSON, XML) based either on the incoming request or a specific configuration you may set.
Your web app could then poll the GET methods on the same API controller class via Ajax (jQuery is nice) to display the results.

Android MySQL php+JSON alternative

I have written a simple database driven app in C# which uses a 2 table MySQL database. This is all a learning curve for me (except c#, which I am now comfortable with)
The app is small, has a couple of datagridviews, uses a few sql select/inserts statments to populate the datagridviews and also update records.
I want to port this app to Android. All of the internet sources I can find recommend a middle php sript which accepts http requests in order to fetch the data from MySQL and then return the results back to the android device where it is parsed with JSON etc etc.
This method is a little out of my reach since I dont have php experience, all of my attempts to implement the php layer have failed, speciially the android app was not receiving any data back, I'm assuming I messed up somewhere inside the php file.
Is there an easier (more noobproof) way to interact with the MySQL database from within android which doesnt require the need for php + JSON? Any ideas are appreciated, thank you in advance.
If you are comfortable with C#, why not use ASP.Net MVC for the middle man?
MVC is especially easy to deal with JSON, and you actually only need to create those "controllers" (as models should already be there from your existing app, and JSON don't need the View to display).
You can create a Web Service with C# that handles the data retrieval from the database; no need to go with PHP. Try create one with WCF API (check this question in order to create one). In order to create an Android client that consumes JSON on Android check this link.
If your mobile application have to access a database over the network you should indeed build a web service fronted to the database.
By putting a web access layer on top of the database you can expose the required queries in an abstracted, secure and convenient manner.
Though this sort of web service architecture can be implemented with PHP + JSON other technologies can be used as well. If you feel more comfortable with C# you can use it to build the web service instead. By doing so you may even be able to reuse some of the code from your existing application.
Actually, it would be better to take php in middle of android & mysql, due to the security concern and by the way this is the most easiest & comfortable method. here is link link. I hope you like it.

how web applications communicate each other in struts?

I have two web applications in web application server. i want to get data from one application to another. how do i do in Struts. i know that it is possible by webservices. But, is there anyway that i could get it using struts?.
Use query string to pass data using request parameters.
/action.do?varA=1&var2=3
This'll work for simple cases. For complex requirements/exchange please use Web Services or other integration technologies.