Tag Info

New answers tagged

1

Using a Web API allows you to program to an interface rather than a concrete implementation. Need to generate an invoice (for example)? Just call the Web API method to generate that invoice. Should the need arise in the future to change the way invoicing works, you can just change the code behind the interface, (or swap it out for a completely different ...


0

This is what a conventional rails controller would look like: class HeroesController < ApplicationController before_filter :authenticate_user! before_filter :user_only def index @heroes = current_user.heroes.find_by_level(params[:level]) end end Controllers should map to resources, and your controller is returning a list of heroes. ...


0

This calculation is Business Logic and should go in the Domain Layer of your application, i.e. your models. The controller is the wrong place for this logic because it should be pretty dumb. It knows what to do (calculate a value) but not why it happens or the nitty gritty details of how it happens (the algorithm for the calculation). A view model should ...


0

I would say this is fine. You are using view templates, interacting with a controller, that's all good. You might want to consider having a model and using that for the static data. Models will normally be database backed "Active Record" objects but do not have to be, they can also be used to hold the kind of data you have.


1

It depends on your actual infrastructure. Without knowing how and where do you host your application, it will be difficult to answer. The simplest case where all the traffic is directed to one machine (for example multiple machines are connected to the internet through a router, and one of them is configured as being a DMZ, receiving all the requests from ...


-3

In a short answer YES. But, here is why HTML is the structure of all web and JS is the interaction of the web. I know you probably heard that a lot but, it is very important to know. Some frameworks will let you not use (or not use a lot) of HTML and JS but, they are the basics of the web. If you do not want to learn code hire someone. And also I know this ...


1

I think option 2 is your best bet. While the public and admin sites are related and use the same DB most likely, admin use cases and work flows typically have little overlap with the use cases and workflows in the public site. So the admin site will likely have its own distinct set of business logic. You can certainly move code which is common into ...


0

Short answer: Do the name to box resolution at the network tier, either setup a DNS server as the 'database' that holds the resolution table, or do it in the router. An easier approach might be to set up the routes in your web portal machine's hosts file. Depending on how you make the calls that might not need a redeploy. Longer answer: I you want to go ...


0

Use CNAMEs in your internal DNS. Then you just point your url at e.g. http://foo-service.example.com/ and leave it there. When you move the service from machine A to machine B, move the CNAME.


3

It depends on the map. Cartographic maps are projections of a (nearly) spherical surface onto a flat, two dimensional surface. That is: (X, Y) = Fproj(Lat, Long) where Fproj() is the projection function. For instance, for a standard Mercator projection with the X axis on the equator, and the Y axis at the 0 Meridian: X = Longitude Y = ln(tan(Latitude) + ...


1

There are open source dropbox alternatives that you can host yourself and support Amazon S3 for storage. Look at Owncloud for example. All you would have to do is change the branding on the site and the client interfaces (or just the client interface if you won't be sharing the website itself) and you have a solution.


0

Tip1: why not use something out of the box? I'm sure there are already plenty of existing services providing file hosting/sharing which you can also access through an API/FTP/whatever. Tip2: Amazon EC2/S3 is a lot of complexity... well, it afew years ago at least, dunno if it changed meanwhile. But I wouldn't go there freely. There are much better ...


1

You could embed a webserver in the native application, then your client can make calls to it via hard-coded links to http://localhost/xyz (you may have to worry about cross site scripting warnings here, and/or run the server on a non-http port). If you use websockets, your native application can even push data to the web browser once the browser has ...


-1

For making a game in c# for multiple platforms Unity3D is most popular now a days. And for integrating Facebook leaderboard or any type of leaderboard, saving user scores fetch scores, it is more efficient to direct communicate with a cloud service instead of making your own server, database etc. This will be more effective for your game performance. Have a ...


0

Developing a website obviously includes developing the HTML and CSS, because basically that is the web page. If developing a website doesn't include that, what does it include? So if you have a project where there happens to be a design in PSD, and that design has to be transformed into HTML and CSS, and you call that transformation "slicing", then yes ...


0

It's really a matter of opinion. In the standard MVC pattern for web applications, you have one controller per action the user performs, but like many other modern implementations of the pattern, Asp.net MVC allows you to have multiple actions in a single controller class. Grouping them by entity they affect is one option, as is having a class for each ...


1

You use a controller when you have a need to access a resource externally. So if you're building an interface to modify employee information, then you have a need for a controller there. Just because you have a resource, though, doesn't mean you need a controller for it. Suppose you have a location class/model that refers to addresses. Maybe an employee has ...


0

The whole point of MVC is decoupling layers from each other. UI work can be done independent of business rules. Business rules can be crafted independently of the UI or data access. And the Model can mine away all the data it wants independently of the Business rules. Notice that the UI and Model shouldn't ever know of each other. "Business logic" about ...


0

A controller is the mediator between the model and the view. Essentially, the controller reads the user input from the view, and updates the model in accordance to the changes. Without a controller, the view will be too tightly coupled with the data model. If you were to change one small thing in the model, it could completely screw up the view. Whereas if ...


1

You should design your backend around the resources you are exposing from the backend. These do not have to match up exactly to your model (the exposed resources and the internal model are two separate things), but often you will have a lot of overlap. For example you might have a "user" model object and a "user" resource exposed by the server. A ...


0

Prosody XMPP server (Open source, previously it was Jabber..) Use Google Cloud Messaging (GCM) service for android Use BOSH for your website. I believe BOSH stands for 'Bidirectional-Streams over Synchronous HTTP'. BOSH (previously known as 'HTTP binding' or "http-bind") is a technology to use XMPP over HTTP. This allows XMPP applications to run in web ...


2

There's a couple ways you can mingle a native app and a browser app. You can embed the browser inside the native app, much like PhoneGap apps do on mobile. That will allow you to extend the browser's javascript engine, and let you make calls between the two. Alternatively, rethink your architecture. Have both the native application and the browser based ...



Top 50 recent answers are included