What I am trying to do is to call a web service using jquery (ajax json call) and use this SocketScan sdk in the web service (C# based web service).
As, my Mobile App uses only Jquery so I have to make use of this Socketscan sdk in the web service only.
I want to build a sample app for the same. How can I achieve this?
I have added the dll reference to my web service and can see all the methods used in dll but I am not able to understand the flow of dll.
Regards
Aman
Telerik AppBuilder is based on Cordova, so you can't call native code directly and the ScanAPI SDK doesn't support javascript. You will need a plugin which wraps the native SDK (C#, Java or Objective-C, depending on your target platform) and exposes the functionality you need to your app. You may have to develop a Cordova plugin, if there isn't already a plugin released under a suitable license for your app.
Related
In ASP.NET Core 2.2 it was rather straightforward to have an ASP.NET Core website with React front-end and working server-side rendering - since SSR was supported out-of-the-box in the ASP.NET Core+React template, which internally run the NodeServices to executed the javascript using node.
However with ASP.NET Core 3.1 things are not so easy anymore, mainly because the SpaServices and NodeServices classes are declared as obsolete and will be removed with .NET 5, according to this link. So no javascript execution with node from C# anymore.
Now, besides the information, that the server-side rendering suggested in ASP.NET Core 2.2 is now obsolete, the only suggestion how to go forward I found is from above article:
To enable features like server-side prerendering and hot module reload please refer to the documentation for the corresponding SPA frameworks.
But if I understand correctly, to have react-based server-side rendering, I need to have a node.js server which will perform the rendering on the server-side.
Does that mean, that if I want to have an ASP.NET Core 3.1 website with a React front-end with SSR - I should have one ASP.NET Core project for the WebAPI, and another separate Node.JS project for the front-end with SSR?
And then deploy them on two separate Azure AppServices?
Is that the recommended architecture for ASP.NET Core + React projects?
I came across exactly the same problem. It took me a few weeks to create a new set up where frontend is separate from the backend.
I published the prepared boilerplate on GitHub and wrote a blog posts that explains how to enable server-side rendering with ASP.NET Core and React in details. The solution is a combination of CRA (Create React App), Storybook for CRA and a standard ASP.NET Core MVC template.
To make a long story short I built my custom asp-prerender-module and asp-prerender-data attributes. They communicate with an Express server based on Node.js to get the rendered HTML. Thereafter the HTML served to the browser gets "hydrated" with actions.
After spending some time researching, that are the current options:
Live on .NET Core 3.1 with the NodeServices with an obsolete flag
Create separate projects for back-end (asp.net) and front-end (node.js)
Fork/copy NodeServices and maintain by myself
Hope that a there will be a community driven fork of the NodeServices in the comming months before .NET 5 release were it will be removed eventually
You can use a new library to invoke JS from .net which is
https://github.com/JeringTech/Javascript.NodeJS
You can use SSR on .net with the above library Razzle described here:
https://dev.to/pruttned/integrating-react-into-asp-net-core-using-razzle-with-all-the-goodies-like-ssr-routing-code-splitting-and-hmr-part-1-2-34g8
BUT at the time of writing I find that there is no information on how to deploy such an application.
Reactjs is working on the Server component to stream partially rendered UI in the form of JSON data to clientside. https://github.com/reactjs/rfcs/blob/2b3ab544f46f74b9035d7768c143dc2efbacedb6/text/0000-server-components.md
I think for future integration of Server component, it needs a native NodeJS process to handle server rendering.
i am really new on this so i need some suggestions.
Using Visual Studio, i want to create an android application and i want to have flexibility so i will use Apache Cordove. It allows you to use standard web technologies - HTML5, CSS3, and JavaScript for cross-platform development.
This is my client-side part and this part will communicate with the server-side ASP.NET Web Service and provide datasources through HTPP Ajax requests.
In this scenario, how can publish my app for testing and maybe after that for publish to outworld?
If i host my Web Service to azure and create the apk file will be work?
Creating a Android app using apache cordova requires a Android SDK.You need to install packages required to create and run the apache cordova using visual studio, There is another alternative for this which I found easy one use ubuntu linux with eclipse and Android SDk latest version which can be configured to create a apache cordova project.
Your another concern is regarding the calling of a webservice hosted on azure environment is as easy and same as calling a webservice's webmethods from javascript you just need to provide the appropriate url of the webservice in ajax call.
So this is the issue:
I have a .NET project that includes 5 Web Application Layers.
One of them is API.
I Recently added a Cordova project as well and I'd like it to communicate with the API Layer.
Is there anyone who knows what to do?
P.S.:
I use visual studio 2013.
You can use normal jQuery Ajax calls to make requests to the API. http://api.jquery.com/jquery.ajax/ or just normal JavaScript ajax https://stackoverflow.com/a/8567149/487940.
I hope that answers your question.
If you're talking about calling into Web API web services from a Cordova app, you may find the Breeze.JS framework useful to help you. You can either just used the client library or use some server side code in addition to client code to help get you up and running and exposing new web services as well.
Otherwise it is simply a matter of making web service calls to the server from your JavaScript code but the specifics will depend on exactly what you're trying to do and what client UI/utility framework you are using.
I am building a web application (using ASP.NET Webforms) that will be used on Android phones (Mobile Chrome). I would like to reference cordova.js in the project to use Camera API.
Could someone please provide me with brief steps on how to build Cordova for Android on Windows 7 machine so that I could reference it in Visual Studio project?
http://cordova.apache.org/docs/en/1.5.0/phonegap_camera_camera.md.html#Camera
Thank you
no! completely wrong idea! well, I had this idea same as you because I'm also an asp.net programmer.
the Api can be used only if the html files are placed inside the Android phone, if you open an aspx file, which is located in the IIS, you lose control of the phone and cannot access the api.
so, what you should do is: For the client side, use html, css, JavaScript to write your program. For the Server side, build an asmx Web Services for the client to call.
then in the client side, use 'ajax', 'Post' call the webservices, with 'Cors' enabled and with 'json' data type.
I know Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. GWT is used by many products at Google, including Google Wave and Google AdWords. It's open source, completely free, and used by thousands of developers around the world.
It can be integrated in java based web applications....
Is there any suitable replacement of GWT for asp.net web application?
If so,what is it?
GWT is platform agnostic. It can be easily integrated with any web application, not just Java. You just tell it to inject widgets into elements on the host page - the host page could be static HTML.
The built in RPC mechanism makes it easy to do RPC with a Java on the server side, but you can certainly use JSON or XML to exchange data with your server. It's a little more work, but not impossible. Look up 'overlay types' - these make working with JSON data extremely easy.
Consider SmartGWT. It has a built-in REST connector that is easy to connect to REST services on the .NET platform, which Visual Studio can help you generate.
On the .NET platform, the free open source (LGPL) edition is all you need. If you need commercial license terms, those are available too.
Take a look at Script#, but I'm not sure if it's still in development. "Essentially the Script# compiler is a C# compiler that generates Javascript instead of IL."
http://www.nikhilk.net/Entry.aspx?id=121
If you're just looking to hook up an ASP.net web application with GWT, try
GWT and .NET