Search Results

Search found 752 results on 31 pages for 'restful'.

Page 19/31 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Handling HTTP 404 Error in ASP.NET Web API

    - by imran_ku07
            Introduction:                     Building modern HTTP/RESTful/RPC services has become very easy with the new ASP.NET Web API framework. Using ASP.NET Web API framework, you can create HTTP services which can be accessed from browsers, machines, mobile devices and other clients. Developing HTTP services is now become more easy for ASP.NET MVC developer becasue ASP.NET Web API is now included in ASP.NET MVC. In addition to developing HTTP services, it is also important to return meaningful response to client if a resource(uri) not found(HTTP 404) for a reason(for example, mistyped resource uri). It is also important to make this response centralized so you can configure all of 'HTTP 404 Not Found' resource at one place. In this article, I will show you how to handle 'HTTP 404 Not Found' at one place.         Description:                     Let's say that you are developing a HTTP RESTful application using ASP.NET Web API framework. In this application you need to handle HTTP 404 errors in a centralized location. From ASP.NET Web API point of you, you need to handle these situations, No route matched. Route is matched but no {controller} has been found on route. No type with {controller} name has been found. No matching action method found in the selected controller due to no action method start with the request HTTP method verb or no action method with IActionHttpMethodProviderRoute implemented attribute found or no method with {action} name found or no method with the matching {action} name found.                                          Now, let create a ErrorController with Handle404 action method. This action method will be used in all of the above cases for sending HTTP 404 response message to the client.  public class ErrorController : ApiController { [HttpGet, HttpPost, HttpPut, HttpDelete, HttpHead, HttpOptions, AcceptVerbs("PATCH")] public HttpResponseMessage Handle404() { var responseMessage = new HttpResponseMessage(HttpStatusCode.NotFound); responseMessage.ReasonPhrase = "The requested resource is not found"; return responseMessage; } }                     You can easily change the above action method to send some other specific HTTP 404 error response. If a client of your HTTP service send a request to a resource(uri) and no route matched with this uri on server then you can route the request to the above Handle404 method using a custom route. Put this route at the very bottom of route configuration,  routes.MapHttpRoute( name: "Error404", routeTemplate: "{*url}", defaults: new { controller = "Error", action = "Handle404" } );                     Now you need handle the case when there is no {controller} in the matching route or when there is no type with {controller} name found. You can easily handle this case and route the request to the above Handle404 method using a custom IHttpControllerSelector. Here is the definition of a custom IHttpControllerSelector, public class HttpNotFoundAwareDefaultHttpControllerSelector : DefaultHttpControllerSelector { public HttpNotFoundAwareDefaultHttpControllerSelector(HttpConfiguration configuration) : base(configuration) { } public override HttpControllerDescriptor SelectController(HttpRequestMessage request) { HttpControllerDescriptor decriptor = null; try { decriptor = base.SelectController(request); } catch (HttpResponseException ex) { var code = ex.Response.StatusCode; if (code != HttpStatusCode.NotFound) throw; var routeValues = request.GetRouteData().Values; routeValues["controller"] = "Error"; routeValues["action"] = "Handle404"; decriptor = base.SelectController(request); } return decriptor; } }                     Next, it is also required to pass the request to the above Handle404 method if no matching action method found in the selected controller due to the reason discussed above. This situation can also be easily handled through a custom IHttpActionSelector. Here is the source of custom IHttpActionSelector,  public class HttpNotFoundAwareControllerActionSelector : ApiControllerActionSelector { public HttpNotFoundAwareControllerActionSelector() { } public override HttpActionDescriptor SelectAction(HttpControllerContext controllerContext) { HttpActionDescriptor decriptor = null; try { decriptor = base.SelectAction(controllerContext); } catch (HttpResponseException ex) { var code = ex.Response.StatusCode; if (code != HttpStatusCode.NotFound && code != HttpStatusCode.MethodNotAllowed) throw; var routeData = controllerContext.RouteData; routeData.Values["action"] = "Handle404"; IHttpController httpController = new ErrorController(); controllerContext.Controller = httpController; controllerContext.ControllerDescriptor = new HttpControllerDescriptor(controllerContext.Configuration, "Error", httpController.GetType()); decriptor = base.SelectAction(controllerContext); } return decriptor; } }                     Finally, we need to register the custom IHttpControllerSelector and IHttpActionSelector. Open global.asax.cs file and add these lines,  configuration.Services.Replace(typeof(IHttpControllerSelector), new HttpNotFoundAwareDefaultHttpControllerSelector(configuration)); configuration.Services.Replace(typeof(IHttpActionSelector), new HttpNotFoundAwareControllerActionSelector());         Summary:                       In addition to building an application for HTTP services, it is also important to send meaningful centralized information in response when something goes wrong, for example 'HTTP 404 Not Found' error.  In this article, I showed you how to handle 'HTTP 404 Not Found' error in a centralized location. Hopefully you will enjoy this article too.

    Read the article

  • Adding a hyperlink in a client report definition file (RDLC)

    - by rajbk
    This post shows you how to add a hyperlink to your RDLC report. In a previous post, I showed you how to create an RDLC report. We have been given the requirement to the report we created earlier, the Northwind Product report, to add a column that will contain hyperlinks which are unique per row.  The URLs will be RESTful with the ProductID at the end. Clicking on the URL will take them to a website like so: http://localhost/products/3  where 3 is the primary key of the product row clicked on. To start off, open the RDLC and add a new column to the product table.   Add text to the header (Details) and row (Product Website). Right click on the row (not header) and select “TextBox properties” Select Action – Go to URL. You could hard code a URL here but what we need is a URL that changes based on the ProductID.   Click on the expression button (fx) The expression builder gives you access to several functions and constants including the fields in your dataset. See this reference for more details: Common Expressions for ReportViewer Reports. Add the following expression: = "http://localhost/products/" & Fields!ProductID.Value Click OK to exit the Expression Builder. The report will not render because hyperlinks are disabled by default in the ReportViewer control. To enable it, add the following in your page load event (where rvProducts is the ID of your ReportViewerControl): protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { rvProducts.LocalReport.EnableHyperlinks = true; } } We want our links to open in a new window so set the HyperLinkTarget property of the ReportViewer control to “_blank”   We are done adding hyperlinks to our report. Clicking on the links for each product pops open a new windows. The URL has the ProductID added at the end. Enjoy!

    Read the article

  • Standards Corner: OAuth WG Client Registration Problem

    - by Tanu Sood
    Phil Hunt is an active member of multiple industry standards groups and committees (see brief bio at the end of the post) and has spearheaded discussions, creation and ratifications of  Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-family:"Calibri","sans-serif"; mso-ascii- mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi- mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} industry standards including the Kantara Identity Governance Framework, among others. Being an active voice in the industry standards development world, we have invited him to share his discussions, thoughts, news & updates, and discuss use cases, implementation success stories (and even failures) around industry standards on this monthly column. Author: Phil Hunt This afternoon, the OAuth Working Group will meet at IETF88 in Vancouver to discuss some important topics important to the maturation of OAuth. One of them is the OAuth client registration problem.OAuth (RFC6749) was initially developed with a simple deployment model where there is only monopoly or singleton cloud instance of a web API (e.g. there is one Facebook, one Google, on LinkedIn, and so on). When the API publisher and API deployer are the same monolithic entity, it easy for developers to contact the provider and register their app to obtain a client_id and credential.But what happens when the API is for an open source project where there may be 1000s of deployed copies of the API (e.g. such as wordpress). In these cases, the authors of the API are not the people running the API. In these scenarios, how does the developer obtain a client_id? An example of an "open deployed" API is OpenID Connect. Connect defines an OAuth protected resource API that can provide personal information about an authenticated user -- in effect creating a potentially common API for potential identity providers like Facebook, Google, Microsoft, Salesforce, or Oracle. In Oracle's case, Fusion applications will soon have RESTful APIs that are deployed in many different ways in many different environments. How will developers write apps that can work against an openly deployed API with whom the developer can have no prior relationship?At present, the OAuth Working Group has two proposals two consider: Dynamic RegistrationDynamic Registration was originally developed for OpenID Connect and UMA. It defines a RESTful API in which a prospective client application with no client_id creates a new client registration record with a service provider and is issued a client_id and credential along with a registration token that can be used to update registration over time.As proof of success, the OIDC community has done substantial implementation of this spec and feels committed to its use. Why not approve?Well, the answer is that some of us had some concerns, namely: Recognizing instances of software - dynamic registration treats all clients as unique. It has no defined way to recognize that multiple copies of the same client are being registered other then assuming if the registration parameters are similar it might be the same client. Versioning and Policy Approval of open APIs and clients - many service providers have to worry about change management. They expect to have approval cycles that approve versions of server and client software for use in their environment. In some cases approval might be wide open, but in many cases, approval might be down to the specific class of software and version. Registration updates - when does a client actually need to update its registration? Shouldn't it be never? Is there some characteristic of deployed code that would cause it to change? Options lead to complexity - because each client is treated as unique, it becomes unclear how the clients and servers will agree on what credentials forms are acceptable and what OAuth features are allowed and disallowed. Yet the reality is, developers will write their application to work in a limited number of ways. They can't implement all the permutations and combinations that potential service providers might choose. Stateful registration - if the primary motivation for registration is to obtain a client_id and credential, why can't this be done in a stateless fashion using assertions? Denial of service - With so much stateful registration and the need for multiple tokens to be issued, will this not lead to a denial of service attack / risk of resource depletion? At the very least, because of the information gathered, it would difficult for service providers to clean up "failed" registrations and determine active from inactive or false clients. There has yet to be much wide-scale "production" use of dynamic registration other than in small closed communities. Client Association A second proposal, Client Association, has been put forward by Tony Nadalin of Microsoft and myself. We took at look at existing use patterns to come up with a new proposal. At the Berlin meeting, we considered how WS-STS systems work. More recently, I took a review of how mobile messaging clients work. I looked at how Apple, Google, and Microsoft each handle registration with APNS, GCM, and WNS, and a similar pattern emerges. This pattern is to use an existing credential (mutual TLS auth), or client bearer assertion and swap for a device specific bearer assertion.In the client association proposal, the developer's registration with the API publisher is handled by having the developer register with an API publisher (as opposed to the party deploying the API) and obtaining a software "statement". Or, if there is no "publisher" that can sign a statement, the developer may include their own self-asserted software statement.A software statement is a special type of assertion that serves to lock application registration profile information in a signed assertion. The statement is included with the client application and can then be used by the client to swap for an instance specific client assertion as defined by section 4.2 of the OAuth Assertion draft and profiled in the Client Association draft. The software statement provides a way for service provider to recognize and configure policy to approve classes of software clients, and simplifies the actual registration to a simple assertion swap. Because the registration is an assertion swap, registration is no longer "stateful" - meaning the service provider does not need to store any information to support the client (unless it wants to). Has this been implemented yet? Not directly. We've only delivered draft 00 as an alternate way of solving the problem using well-known patterns whose security characteristics and scale characteristics are well understood. Dynamic Take II At roughly the same time that Client Association and Software Statement were published, the authors of Dynamic Registration published a "split" version of the Dynamic Registration (draft-richer-oauth-dyn-reg-core and draft-richer-oauth-dyn-reg-management). While some of the concerns above are addressed, some differences remain. Registration is now a simple POST request. However it defines a new method for issuing client tokens where as Client Association uses RFC6749's existing extension point. The concern here is whether future client access token formats would be addressed properly. Finally, Dyn-reg-core does not yet support software statements. Conclusion The WG has some interesting discussion to bring this back to a single set of specifications. Dynamic Registration has significant implementation, but Client Association could be a much improved way to simplify implementation of the overall OpenID Connect specification and improve adoption. In fairness, the existing editors have already come a long way. Yet there are those with significant investment in the current draft. There are many that have expressed they don't care. They just want a standard. There is lots of pressure on the working group to reach consensus quickly.And that folks is how the sausage is made.Note: John Bradley and Justin Richer recently published draft-bradley-stateless-oauth-client-00 which on first look are getting closer. Some of the details seem less well defined, but the same could be said of client-assoc and software-statement. I hope we can merge these specs this week. Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-family:"Calibri","sans-serif"; mso-ascii- mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi- mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} About the Writer: Phil Hunt joined Oracle as part of the November 2005 acquisition of OctetString Inc. where he headed software development for what is now Oracle Virtual Directory. Since joining Oracle, Phil works as CMTS in the Identity Standards group at Oracle where he developed the Kantara Identity Governance Framework and provided significant input to JSR 351. Phil participates in several standards development organizations such as IETF and OASIS working on federation, authorization (OAuth), and provisioning (SCIM) standards.  Phil blogs at www.independentid.com and a Twitter handle of @independentid.

    Read the article

  • Java EE 7 Status Update - November 2012

    - by arungupta
    Here is a quick status update on different components that are targeted to be included in the Java EE 7 Platform: Java EE 7 Platform (JSR 342) - Early Draft 2 (list, project, javadocs ?) Java Persistence API 2.1 (JSR 338) - Early Draft 2 (list, project, javadocs ?) Java API for RESTful Web Services 2.0 (JSR 339) - Public Review (list, project, javadocs) Servlets 3.1 (JSR 340) - Early Draft (list, project, javadocs ?) Expression Language 3.0 (JSR 341) - Public Review (list, project, javadocs ?) Java Message Service 2.0 (JSR 343) - Early Draft (list, project, javadocs) JavaServer Faces 2.2 (JSR 344) - Early Draft (list, project, javadocs ?) Enterprise JavaBeans 3.2 (JSR 345) - Early Draft (list, project, javadocs ?) Context & Dependency Injection 1.1 (JSR 346) - Early Draft (list, project, javadocs) Bean Validation 1.1 (JSR 349) - Public Review (list, project, javadocs ?) JCACHE Java Temporary Caching API (JSR 107) - Early Draft (list, project, javadocs) Batch Applications for the Java Platform (JSR 352) - Early Draft (list, project, javadocs) Java API for JSON Processing (JSR 353) - Early Draft (list, project, javadocs) Java API for WebSocket (JSR 356) - Early Draft (list, project, javadocs) As evident, all the components have released at least an Early Draft specification. Some have released second Early Draft and some even have a Public Review in different stages. Several implementations are already integrated in GlassFish 4. Promoted Builds. Which ones are you tracking or contributing ? Make sure to file an issue so that your usecase and needs are addressed. Download GlassFish 4. Promoted Build and provide feedback.  

    Read the article

  • JavaOne Latin America Schedule Changes For Thursday

    - by Tori Wieldt
    tweetmeme_url = 'http://blogs.oracle.com/javaone/2010/12/javaone_latin_america_schedule_changes_for_thursday.html'; Share .FBConnectButton_Small{background-position:-5px -232px !important;border-left:1px solid #1A356E;} .FBConnectButton_Text{margin-left:12px !important ;padding:2px 3px 3px !important;} The good news: we've got LOTS of developers at JavaOne Latin America.The bad news: the rooms are too small to hold everyone! (we've heard you)The good news: selected sessions for Thursday have been moved larger rooms (the keynote halls) More good news: some sessions that were full from Wednesday will be repeated on Thursday. SCHEDULE CHANGES FOR THURSDAY, DECEMBER 9THNote: Be sure to check the schedule on site, there still may be some last minute changes. Session Name Speaker New Time/Room Ginga, LWUIT, JavaDTV and You 2.0 Dimas Oliveria Thursday, December 9, 11:15am - 12:00pm Auditorio 4 JavaFX do seu jeito: criando aplicativos JavaFX com linguagens alternativas Stephen Chin Thursday, December 9, 3:00pm - 3:45pm Auditorio 4 Automatizando sua casa usando Java; JavaME, JavaFX, e Open Source Hardware Vinicius Senger Thursday, December 9, 9:00am - 9:45am Auditorio 3 Construindo uma arquitetura RESTful para aplicacoes ricas com HTML 5 e JSF2 Raphael Helmonth Adrien Caetano Thursday, December 9, 5:15pm - 6:00pm Auditorio 2 Dicas eTruquies sobre performance em Java EE JPA e JSF Alberto Lemos e Danival Taffarel Calegari Thursday, December 9, 2:00pm - 2:45pm Auditorio 2 Escrevendo Aplicativos Multipatforma Incriveis Usando LWUIT Roger Brinkley Cancelled Platforma NetBeans: sem slide - apenas codigo Mauricio Leal Cancelled Escalando o seu AJAX Push com Servlet 3.0 Paulo Silveria Keynote Hall 9:00am - 9:45am Cobetura Completa de Ferramentas para a Platforma Java EE 6 Ludovic Champenois Keynote Hall 10:00am - 10:45am Servlet 3.0 - Expansivel, Assincrono e Facil de Usar Arun Gupta Keynote Hall 4:00pm - 4:45pm Transforme seu processo em REST com JAX-RS Guilherme Silveria Keynote Hall 5:00pm - 5:45pm The Future of Java Fabiane Nardon e Bruno Souza Keynote Hall 6:00pm - 6:45pm Thanks for your understanding, we are tuning the conference to make it the best JavaOne possible.

    Read the article

  • OTN Virtual Developer Day for WebLogic Server and WebLogic Developer Broadcasts

    - by mike.lehmann
    To further move the new year of 2011 underway for WebLogic Server, quite a series of hands on technical online events and broadcasts are about to get underway from the WebLogic team. The first is Virtual Developer Day: Oracle WebLogic Server which is an online event that combines hands on labs with WebLogic Server through a series of Virtual Box images. This event will cover things like the new Java EE 6 capabilities one can use on WebLogic Server, using Maven and Hudson with WebLogic Server, developing with Web services on WebLogic Server and even upgrading from Oracle Application Server. Very technical, very hands on. And its global - multiple geographies covered.  Nice! James Bayer has put out a full agenda for this on his blog as well as links on how to register. The second is a 5 week long weekly technical broadcast under the umbrella of Accelerate Your Development with Oracle WebLogic Suite walking through topics like working with JPA, designing distributed caching strategies with WebLogic Server, advanced JMS topics and UI topics like JQuery as well restful Web services with Jersey and JAX-RS.  Again in James' blog the full agenda is available to check out if it is interesting for you to attend including a brief video introduction outlining in a bit more detail exactly what will be covered. Hopefully between these two events and the release of WebLogic Server 10.3.4 earlier in January, we are kicking off 2011 in a good fashion.  Looking forward to sharing more as we go forward in 2011.

    Read the article

  • DELETE method not working in Apache 2.4

    - by Xavi
    I'm running Apache 2.4 locally and dealing with RESTful services authenticating through OAuth. GET, PUT and POST work fine but I can't get DELETE to work. I've tried installing WebDAV and mod_dav, overriding methods in .htaccess, tried Limits, force (enable) DELETE options in configuration and pretty much everything I've found in Google and StackExchange. Here's a copy of my .htaccess right now: <IfModule mod_rewrite.c> Header add Access-Control-Allow-Origin: * Header add Access-Control-Allow-Headers: Authorization Header add Access-Control-Allow-Headers: X-Requested-With Header add Access-Control-Request-Method: HEAD Header add Access-Control-Request-Method: GET Header add Access-Control-Request-Method: PUT Header add Access-Control-Request-Method: DELETE Header add Access-Control-Request-Method: OPTIONS Options +FollowSymlinks Options -Indexes RewriteEngine on RewriteRule ^(.*)\.* index.php [NC,L] </IfModule> Chrome's console shows: XMLHttpRequest cannot load http://dev.server.com/cars/favourite/. Method DELETE is not allowed by Access-Control-Allow-Methods. Is there anything I am missing?

    Read the article

  • JavaServer Faces 2.0 for the Cloud

    - by Janice J. Heiss
    A new article now up on otn/java by Deepak Vohra titled “JSF 2.0 for the Cloud, Part One,” shows how JavaServer Faces 2.0 provides features ideally suited for the virtualized computing resources of the cloud. The article focuses on @ManagedBean annotation, implicit navigation, and resource handling. Vohra illustrates how the container-based model found in Java EE 7, which allows portable applications to target single machines as well as large clusters, is well suited to the cloud architecture. From the article-- “Cloud services might not have been a factor when JavaServer Faces 2.0 (JSF 2.0) was developed, but JSF 2.0 provides features ideally suited for the cloud, for example:•    The path-based resource handling in JSF 2.0 makes handling virtualized resources much easier and provides scalability with composite components.•    REST-style GET requests and bookmarkable URLs in JSF 2.0 support the cloud architecture. Representational State Transfer (REST) software architecture is based on transferring the representation of resources identified by URIs. A RESTful resource or service is made available as a URI path. Resources can be accessed in various formats, such as XML, HTML, plain text, PDF, JPEG, and JSON, among others. REST offers the advantages of being simple, lightweight, and fast.•    Ajax support in JSF 2.0 is integrable with Software as a Service (SaaS) by providing interactive browser-based Web applications.” In Part Two of the series, Vohra will examine features such as Ajax support, view parameters, preemptive navigation, event handling, and bookmarkable URLs.Have a look at the article here.

    Read the article

  • Securing Back End API for Mobile Applications

    - by El Guapo
    I have an application that I am writing for both iOS and Android; this application will be served by a ReSTFUL API running on a cluster of servers on "the internets". I am curious how the rest of the world is going about securing their APIs so only specific applications running on iOS or Android can use these APIs. I could go the same route as other OAuth providers by providing a key/secret combination (2-legged OAuth), however, what do I do if I ever have to change these keys??? Do I create a new key/secret for every person that downloads the app??? The application is a social-based game that will allow the user to interact with other "participants" in the game based on location, achievements, etc. The API will provide the following functions: -Questions, Quests, etc -Profile Management -User Interaction -Possible Social Interaction Once the app gains traction I plan on opening up the API ala Facebook, Twitter, etc. Which is easy enough, I plan on implementing an OAuth Server and whatnot. However, I want to make sure, during this phase, that only people who are using the application can access and use the API.

    Read the article

  • REST and redirecting the response

    - by Duane Gran
    I'm developing a RESTful service. Here is a map of the current feature set: POST /api/document/file.jpg (creates the resource) GET /api/document/file.jpg (retrieves the resource) DELETE /api/document/file.jpg (removes the resource) So far, it does everything you might expect. I have a particular use case where I need to set up the browser to send a POST request using the multipart/form-data encoding for the document upload but when it is completed I want to redirect them back to the form. I know how to do a redirect, but I'm not certain about how the client and server should negotiate this behavior. Two approaches I'm considering: On the server check for the multipart/form-data encoding and, if present, redirect to the referrer when the request is complete. Add a service URI of /api/document/file.jpg/redirect to redirect to the referrer when the request is complete. I looked into setting an X header (X-myapp-redirect) but you can't tell the browser which headers to use like this. I manage the code for both the client and the server side so I'm flexible on solutions here. Is there a best practice to follow here?

    Read the article

  • What should be the architecture of an urban game system?

    - by pmichna
    I'm going to develop an urban game using a telco API for phone geolocation and sending/receiving messages. A player would pick up one of the scenarios, move around the city and when he hits a given location, he gets a message and possibly has to answer it. I'm wondering, what approach would be the best in my case. I came up with this general idea: Web application as a user interface (user registration, players ranking, scenarios editing) written in Ruby on Rails. Game server (hosting games, game logic like checking players location, sending and receiving messages) written in Ruby. Database (users, scores, scenarios etc.), probably MySQL or someother open source DB. I want to learn Ruby and RoR, that's why I chose these language and framework. Do you think it's a good choice for a game server? Another question: is this project division good? I mean, I have little experience with Ruby and Rails - that's why I'm asking. Maybe it's better to have web application merged with game server and somehow have the server hosting RoR application do the tasks like mobile phone pinging and message sending? How would that be performed? Maybe this is worth mentioning: the API is RESTful, most results are JSON, few are XML.

    Read the article

  • New cloud development workflow using Github, Cloud9ide and CloudFoundry.

    - by weng
    So time is changing towards cloud development/computing. I'm trying to get the new "cloud" workflow based on the services I'm going to use: Github, Cloud9ide and CloudFoundry. Here is what is on my mind: Github acts like a central (main repo) just like yesterday's local filesystem. Every service will base it service upon this main repo. Workflow: Github: I create a new Github repo served as main repo for the project. Cloud9ide. I open my Github repo and write my tests and implementation (BDD/TDD). When I'm ready I save (commit) it to main repo on Github. X: A running instance of Jenkins detects someone has committed and fetches the latest commit, builds, deploys, tests (yeti and/or selenium) and reports if the tests were passed or not. If not, I make another commit til all tests are passing. X: I run the CloudFoundry commands to push the main Github repo to CloudFoundry's server and it will deploy my app automatically. What I'm still confused about is where this X environment will be. On a local server where I have to install Jenkins? Or could I install it on Cloud9ide (when java is supported) or will it be on another cloud service? Also, that X environment has to be able to fetch (clone) the Github repo and run the build scripts. And since the concept of Cloud9ide is very new and there haven't been any other predecessors I really wonder how the workflow will look like. We all know Github's workflow. We now know CloudFoundry's workflow (deploy/scale with a restful API/command line tool). But how Cloud9Ide will operate is still somewhat unclear to me. Someone on Cloud9ide mentioned that there will be buttons like deploy so I can deploy with one click. But that I guess will depend on what services that deploy process will hook up into etc. Could someone enlighten this cloud workflow topic and fill in the gaps. Thanks.

    Read the article

  • Contribute to GlassFish in Five Different Ways

    - by arungupta
    GlassFish has a lot to offer from Java EE 6 compliance, HA & Clustering, RESTful administration, IDE integration and many other features. However a recent blog by Markus, a GlassFish Champion, said something different: Ask not what GlassFish can do for you, but ask what you can do for GlassFish! Markus explained how you can easily contribute to GlassFish without being a programming genius. The preparatory steps are simple: • First of all: Don't be afraid! • Prepare yourself - Get up to speed! And then specific suggestions with cross-referenced documents: • Review, Suggest and Add Documentation! • Help Others - be a community hero! • Find and File Bugs on Releases! • Test-drive Promoted Builds and Release Candidates! • Work with Code! Get things done! Are you ready to contribute to GlassFish ? Read more details in Markus's blog.

    Read the article

  • Integration of routes that are not resources in an MVC REST style application

    - by Emil Lerch
    I would like to keep my application relatively REST-pure for the sake of consistency, but I'm struggling philosophically with the relatively few views (maybe just one) that I'll need to build that don't relate to resources directly, and therefore do not fit into a REST style. As an example, take the home page. Ruby on rails seems to bail on their otherwise RESTful approach for this very basic need of all web sites. The home page appears special: You can get it, but a get at the resource level is supposed to give you a collection of elements. I can imagine this being the list of routes maybe, but that seems a stretch, and doesn't address anything else. Getting the home page by id doesn't seem to make a whole lot of sense - what's the element of a home collection? Again, maybe routes, but a get on a route would do what? Redirect? This feels odd. You can't delete it (arguably you could allow this for administrators) Adding a second one doesn't make sense except possibly if the elements were routes Updating it might make sense for administrators, but AFAIK REST doesn't describe updates on the resource directly, only elements of the resource (this article explicitly says "UNUSED" for PUTS on the resource) Is the "right" thing to do just to special case these types of things? At the end of the day, I can wrap my head around most of applications being gathered around resources...I can't think of another good example other than a home page, but since that's the start of an application, I think it warrants some thought.

    Read the article

  • JQuery / JSON + .Net Service Layer - to WCF or Not to WCF?

    - by hanzolo
    I Recently had a discussion with a colleague of mine about the pros / cons of WCF. He mentioned about how much code is generated to support WCF, and also the overhead required. It was mentioned that a simple jQuery /Ajax post to a .aspx page (or a handler for that matter) that returns JSON would work more efficiently and takes much less code to implement. I am also aware of the new WCF Web API and feel that technology may solve the "bloated"-ness required in attaining a proxy etc... by just outputting JSON. So when developing a relational DB (MSSQL) storage model, with a fairly complex Business Layer (C#) and Data Access Layer (EntityFW).. what's a good technology for creating a "service layer" which will spit out View Models represented in JSON, with a CQRS(Command Query..) approach in mind.. The app would use the service layer to support it's required UI, as well as provide an available subset of services (outputting JSON data) for service subscribers.. In other words an admin panel to support the admin UI, and service endpoints that return JSON to access the configurations made from the administration UI. What are some potential technologies to use as the transport / communication layer. I'd like to use a pure RESTful approach, but am not against doing some URL rewriting with IIS. Obviously some of the available technologies are: WCF WCF Web API (should this even be separate?) Straight request / response (query string to .aspx / handler) Would using MVC .Net solve this entire problem? maybe their single page app approach? any suggestions / feedback from developing this type of application? Thanks,

    Read the article

  • Selecting a JAX-RS implementation for a new project

    - by Fernando Correia
    I'm starting a new Java project which will require a RESTful API. It will be a SaaS business application serving mobile clients. I have developed one project with Java EE 6, but I'm not very familiar with the ecosystem, since most of my experience is on the Microsoft platform. Which would be a sensible choice for a JAX-RS implementation for a new project such as described? Judging by Wikipedia's list, main contenders seem to be Jersey, Apache CXF, RESTeasy and Restlet. But the Comparison of JAX-RS Implementations cited on Wikipedia is from 2008. My first impressings from their respective homepages is that: CXF aims to be a very comprehensive solution (reminds me of WCF in the Microsoft space), which makes me think it can be more complex to understand, setup and debug than what I need; Jersey is the reference implementation and might be a good choice, but it's legacy from Sun and I'm not sure how Oracle is treating it (announcements page doesn't work and last commit notice is from 4 months ago); RESTeasy is from JBoss and probably a solid option, though I'm not sure about learning curve; Restlet seems to be popular but has a lot of history, I'm not sure how up-to-date it is in the Java EE 6 world or if it carries a heavy J2EE mindset (like lots of XML configuration). What would be the merits of each of these alternatives? What about learning curve? Feature support? Tooling (e.g. NetBeans or Eclipse wizards)? What about ease of debugging and also deployment? Is any of these project more up-to-date than the others? How stable are them?

    Read the article

  • Distinction between API and frontend-backend

    - by Jason
    I'm trying to write a "standard" business web site. By "standard", I mean this site runs the usual HTML5, CSS and Javascript for the front-end, a back-end (to process stuff), and runs MySQL for the database. It's a basic CRUD site: the front-end just makes pretty whatever the database has in store; the backend writes to the database whatever the user enters and does some processing. Just like most sites out there. In creating my Github repositories to begin coding, I've realized I don't understand the distinction between the front-end back-end, and the API. Another way of phrasing my question is: where does the API come into this picture? I'm going to list some more details and then questions I have - hopefully this gives you guys a better idea of what my actual question is, because I'm so confused that I don't know the specific question to ask. Some more details: I'd like to try the Model-View-Controller pattern. I don't know if this changes the question/answer. The API will be RESTful I'd like my back-end to use my own API instead of allowing the back-end to cheat and call special queries. I think this style is more consistent. My questions: Does the front-end call the back-end which calls the API? Or does the front-end just call the API instead of calling the back-end? Does the back-end just execute an API and the API returns control to the back-end (where the back-end acts as the ultimate controller, delegating tasks)? Long and detailed answers explaining the role of the API alongside the front-end back-end are encouraged. If the answer depends on the model of programming (models other than the Model-View-Controller pattern), please describe these other ways of thinking of the API. Thanks. I'm very confused.

    Read the article

  • Java EE 7 JSR update

    - by Heather VanCura
    Java EE 7 JSR update...in case you missed the last few entries with JSR updates, there are 8 Java EE 7 JSRs currently in JCP milestone review stages.  Your input is requested and needed! JSR 342: Early Draft Review 2– Java Platform, Enterprise Edition 7 (Java EE 7) Specification (review ends 30 November); Oracle JSR 107: Early Draft Review - JCACHE - Java Temporary Caching API (review ends 22 November); Greg Luck, Oracle JSR 236: Early Draft Review – Concurrency Utilities for Java EE (review ends 15 December); Oracle JSR 338: Early Draft Review 2 – Java Persistence 2 (review ends 30 November); Oracle JSR 346: Public Review – Contexts and Dependency Injection for Java EE 1.1 (EC ballot 4-17 December); RedHat JSR 352: Public Review – Batch Applications for the Java Platform (EC ballot 4-17 December); IBM JSR 349: Public Review – Bean Validation 1.1 (EC ballot 20- 26 November); RedHat JSR 339: Public Review – JAX-RS 2.0: The Java API for RESTful Web Services (Review period ended, EC ballot ends 26 November); Oracle  Also, check out the Java EE wiki with a specification and schedule update, including most recently, the addition of JSR 236.

    Read the article

  • Which .NET REST approach/technology/tool should I use?

    - by SonOfPirate
    I am implementing a RESTful web service and several client applications that are mostly in Silverlight. I am finding a litany of options for developing both the server-side and client-side of the API but am not sure which is the best approach. I'm concerned about stability as well as a platform that will continue to exist a few months from now. We started using the REST Starter Kit with .NET 3.5 but moved to the new WCF Web API when updating to .NET 4.0. All of their documentation indicates that WCF Web API is the replacement for the RSK. However, Web API is only in Preview 4 and does not include support for Silverlight or Windows Phone 7 clients (yet). WCF Web API looks like a wrapper on top of the WCF WebHttp Services stuff provided in the System.ServiceModel.Web library which makes me think that maybe it would be simpler to just go with the built-in stuff but Web API does offer some nice features. I am specifically tied-up trying to determine the best course for the client-side. My main requirement is that I need to support deserializing into my client-side objects quickly and easily. The Web API offers a nice client library but doesn't have a Silverlight version. I'd like to use the latest approach and the toolset that is being actively developed and supported. Is the REST Starter Kit really obsolete? Has anyone had any success implementing the WCF Web API toolkit? Is there merit to using either of these over the built-in WCF WebHttp Services features found in System.ServiceModel.Web? Is there a single solution that works for any client (web, Silverlight, etc.)? What suggestions do you have?

    Read the article

  • links for 2011-03-01

    - by Bob Rhubart
    Oracle Technology Network Architect Day: Denver - March 23 This live one-day event will bring together architects from a broad range of disciplines and domains to share insights and expertise in the use of Oracle technologies to meet the challenges today’s architects regularly face. (tags: oracle otn architect entarch) Java.net Reborn (Oracle Technology Network Blog (aka TechBlog)) "The migration was huge effort. Over 1400 projects were migrated (and some 30 projects are left to go). A large part of the migration was a big cleanup of abandoned projects...The new java.net site is smaller, faster and now the percentage of good, current content is much higher." (tags: oracle otn java java.net) This Week: OTN Java Developer Day in Boston, Massachusetts (US) | Java.net "This Thursday, March 3, the Oracle Technology Network will be hosting an OTN Developer Day titled You are the future of Java in Boston, Massachusetts (US). The all-day event includes a keynote address ("Java, the Language of the Future") and four separate tracks..." (tags: oracle otn java event) A brief introduction to BRM and architecture (Red Adventure) Yani Miguel offers a primer on the architecture behind Billing and Revenue Management. (tags: oracle otn brm) SOA Suite Integration: Part 1: Building a Web Service (The Shorten Spot) Anthony Shorten's first post in a new series "will not feature SOA Suite at all, but will concentrate on the capability for the Oracle Utilities Application Framework to create Web Services you can use for integration." (tags: oracle otn SOA soasuite) Darwin-IT: VirtualBox on Windows XP Martien van den Akker shares a few tips. (tags: oracle otn virtualization virtualbox) Pas Apicella: Developing RESTful Web Services from JDeveloper 11g (11.1.1.4) Plas says: "In this example we use JDeveloper to create a basic JAX-RS Web Service from support provided within the code editor as no wizard support exists within JDeveloper 11g at this stage." (tags: oracle otn REST SOA) Alexander Buckley: Maintenance Review of the Java VM Specification The Java Virtual Machine Specification is the authoritative reference for the design of the Java virtual machine that underpins the Java SE platform. In an implementation-independent manner, the Specification describes the architecture, linking model, and instruction set of the Java virtual machine, (tags: oracle otn java virtualization jvm javase)

    Read the article

  • Java Desktop Application For Network users

    - by Motasem Abu Aker
    I'm developing a desktop application using Java. My application will run in a network environment where multiple users will access the same database through the application. There will be basic CRUD opreations (Insert, Update, Delete, & select), which means there will be chances of deadlock, or two users trying to update the same record at same time. I'm using the following Java Swing for Clients (MVC). MySQL Server for database (InnODB). Java Web start. Now, MySQL is centralized on the network, and all of the clients connect to it. The Application for ERP Purpose. I searched the internet to find a very good solution to ensure data integrity & to make sure that when updating one record from one client, other clients are aware of it. I read about Socket-server-client & RESTful web services. I don't want to go web application & don't want to use any extra libraries. So how can I handle this scenario: If User A updates a record: Is there a way to update User B's screen with the new value? If user A starts updating a record, how can I prevent other users from attempting to update the same record?

    Read the article

  • Thick models Vs. Business Logic, Where do you draw the distinction?

    - by TokenMacGuy
    Today I got into a heated debate with another developer at my organization about where and how to add methods to database mapped classes. We use sqlalchemy, and a major part of the existing code base in our database models is little more than a bag of mapped properties with a class name, a nearly mechanical translation from database tables to python objects. In the argument, my position was that that the primary value of using an ORM was that you can attach low level behaviors and algorithms to the mapped classes. Models are classes first, and secondarily persistent (they could be persistent using xml in a filesystem, you don't need to care). His view was that any behavior at all is "business logic", and necessarily belongs anywhere but in the persistent model, which are to be used for database persistence only. I certainly do think that there is a distinction between what is business logic, and should be separated, since it has some isolation from the lower level of how that gets implemented, and domain logic, which I believe is the abstraction provided by the model classes argued about in the previous paragraph, but I'm having a hard time putting my finger on what that is. I have a better sense of what might be the API (which, in our case, is HTTP "ReSTful"), in that users invoke the API with what they want to do, distinct from what they are allowed to do, and how it gets done. tl;dr: What kinds of things can or should go in a method in a mapped class when using an ORM, and what should be left out, to live in another layer of abstraction?

    Read the article

  • JSR Updates - Multiple JSRs migrate to latest JCP version

    - by Heather VanCura
    As part of the JCP.Next reform effort, many JSRs have migrated to the latest version of the JCP program in the last month.  These JSRs' Spec Leads and Expert Groups are contributing to the strides the JCP has been making to enable greater community transparency, participation and agility to the working of the JSR development through the JCP program. Any other JSR Spec Leads interested in migrating to the latest JCP version, now JCP 2.9, as of 13 November, incorporating the Merged Executive Committee (EC), see the Spec Lead Guide for instructions on migrating to the latest JCP version.  For JCP 2.8 JSRs, you are effectively already operating under JCP 2.9 since there are no longer two ECs.  This is the difference for JCP 2.8 JSRs migrating to JCP 2.9 -- a merged EC.  To make the migration official, just inform your Expert Group on a public channel and email your request to admin at jcp.org. JSR 310, Date and Time API, led by Stephen Colebourne and Michael Nascimento and Oracle (Roger Riggs)  JSR 349, Bean Valirdation 1.1, led by RedHat (Emmanuel Bernard) JSR 350, Java State Management, led by Oracle (Mitch Upton) JSR 339, JAX-RS 2.0: The Java API for RESTful Web Services, led by Oracle, (Santiago Pericas-Geertsen and Marek Potociar) JSR 347, Data Grids for the Java Platform, led by RedHat (Manik Surtani)

    Read the article

  • JavaOne Latin America Schedule Posted

    - by reza_rahman
    The official schedule for JavaOne Latin America 2012 is now posted. For the folks that are not yet aware, JavaOne Latin America is to be held on 4-6 December at the Transamerica Expo Center in São Paulo, Brazil. As you can expect there are keynotes, technical sessions, hands-on labs and demos led by Java luminaries from Brazil, Latin America and across the globe. There's tons of good stuff on Java EE and GlassFish. Arun Gupta will be delivering the Java technical keynote alongside the likes of Judson Althoff, Nandini Ramani, Georges Saab, Henrik Stahl, Simon Ritter and Terrence Barr. Here are just some of the Java EE centric sessions: Time Title Location Tuesday, Dec 4 12:15 PM Designing Java EE Applications in the Age of CDI Mezanino: Sala 14 Wednesday, Dec 5 5:30 PM Java EE 7 Platform: More Productivity and Integrated HTML Keynote Hall Thursday, Dec 6 11:15 AM Developing JAX-RS Web Applications Utilizing Server-Sent Events and WebSocket Mezanino: Sala 2 Thursday, Dec 6 12:30 PM HTML5 WebSocket and Java Mezanino: Sala 12 Thursday, Dec 6 1:45 PM What's new in Java Message Service 2.0 Mezanino: Sala 14 Thursday, Dec 6 3:00 PM JAX-RS 2.0: New and Noteworthy in the RESTful Web Services API Keynote Hall Thursday, Dec 6 4:15 PM Testing JavaServer Faces Applications with Arquillian and Selenium Mezanino: Sala 13 Thursday, Dec 6 4:15 PM Distributed Caching to Data Grids: The Past, Present, and Future of Scalable Java Mezanino: Sala 14 There will also be Java EE/GlassFish demos at the DEMOgrounds. The full schedule is posted here. Hope to see you there!

    Read the article

  • Java Management Extensions with Oracle WebLogic Server 12c–Webcast Nocember 13th 2012

    - by JuergenKress
    Date: Tuesday, November 13, 2012 Time: 10:00 AM PST You’re responsible for evaluating technologies to monitor and configure Oracle WebLogic Server. This Webcast will help you get a complete picture of what Oracle WebLogic Server 12c with Java Management Extensions (JMX) can do for you. Dr. Frank Munz will explain the development of JMX with Spring and compare it to Java EE. A new feature of Oracle WebLogic Server 12c, the RESTful Management API, will also be examined. Learn how JMX in Oracle WebLogic Server 12c is: Highly efficient. It uses WebLogic Scripting Tool (WLST) instead of a client JMX program written in Java, resulting in little overhead. Effective. It bundles optimized tools such as WLST and WebLogic Diagnostic Framework to eliminate the requirement for Java programming on the client side. Compliant. It is fully standard-compliant but also works with open source clients and frameworks. Register for the Webcast today. Speakers: Dr. Frank Munz, Oracle Technologist of the Year Dave Cabelus, Senior Principal Product Manager, Oracle WebLogic Partner Community For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center. BlogTwitterLinkedInMixForumWiki Technorati Tags: Java,Frank Munz,WebLogic Community,Oracle,OPN,Jürgen Kress

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >