|
I am new to programming and software development.
I am wanting to develop a software package that can edit game cards online and offline. then when the user is online they can upload their work if they need to. Ideally this application will be accessible on computers and mobile phones. I have heard that HTML 5 is really good for mobile application development because it is multiplatform. I have also done some research and NET.Core is multi platform as opposed to NET.framework. I understand that for the mobile and desktop application these may need to be built seperately.
I am wondering where is best to start. Can WinForms in visual studio connect online? or it this purely a desktop application? do i need to create a different style project for online/offline capability?
I am not quite sure where to start here.
|
|
|
|
|
WinForms is solely a desktop technology. Furthermore, it's Windows-only technology.
HTML5 is solely a markup language so it is nothing more than a visual representation of your app. Still, as you've mentioned uploading cards this means to me that you need a backend to persist it.
The way I imagine it is that you have a backend server (you might use .net core for that). And you have clients for platforms you need to support. Once the backend server if not available for some reason you persist data in a client's local storage. Otherwise, you persist it on a backend.
I think you should research more on a client-server programming model.
|
|
|
|
|
I am deploying an ASP .NET application to a website hosted on IIS. My requirement here is that the URL must end in .com and not .aspx. An example would be http://example.com and not http://example/default.aspx. How do I deploy an ASP .NET application so it uses the .com URL and not the not the .aspx page extension?
modified 3-Feb-20 10:35am.
|
|
|
|
|
I'm not sure I understand you correctly because you wrote "http://example/default.aspx" but I think what you meant was http://example.com/default.aspx."
You can't get rid of the .com unless you are using intranet sites.
I think you may be referring to url routing but not really sure what you are asking.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
I think you are correct. What I need is http://example.com/default.aspx
|
|
|
|
|
holdorf wrote: http://example.com/default.aspx Then you register a domain and then upload your files to your hoster. That's it.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
My problem is that this application is being hosted on an intranet. Normal online domain servers can't be used. I guess the question now is can you register a domain name on an intranet network? Do you need something like a Windows DNS server?
|
|
|
|
|
No, I don't think that would work. But why would you want to? If it's working on the intranet and that's where you need it, leave it alone. Why does the url matter?
It sounds like somebody does not understand things very well. An explanation might help.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
I guess I need to explain it better. All I need to do is host the application on the intranet in IIS so browsing to the site is not in the format http://28.4.7.1/default.aspx or http://hostmachinename/default.aspx but in the fully quilified name of the domain name of the network. (ie. http://intranet.mil/default.aspx). Does this make sense?
|
|
|
|
|
holdorf wrote: Does this make sense? Sort of. So, you need to get with the networking people and add a dns entry on the domain for whatever domain you want to have so that all computers on the intranet can get to it.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
I am the only technical person on this project so I am the network folks. Is this your answered to my question. I'm I correct: I need to add a DNS server on my network and register that IP address with the DNS server. Is this what I want to do?
|
|
|
|
|
Yes. DNS is a way of making a word translate into an IP essentially. But I have not touched DNS in many years so I couldn't walk you through it.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
I have deployed an ASP .NET application with a JavaScript Google Map on the home page to a Windows 2012 website. Now when I browse to the application it comes up fine except the Google Map never loads. One thing that does work is if I publish it as a Web Application and using localhost works. It's just when it's published as a website to IIS is where it fails. As a WebSite on the F12 Console windows debugger here are the errors I'm getting:
SEC7120: Origin http://mymachinename not found in Access-Control-Allow-Origin header.
SCRIPTING7002: XMLHttpRequest: Network error 0X80700013, Could not complete operation due to error 80700013.
getPreferences failed when constructing GPToolsService: undefined
<script type="text/javascript">
var map;
MoW.ready(function () {
map = new MoW.Map({
target: 'MoWmap'
});
});
window.onload = function () {
MoW.ready(function () {
if (document.getElementById('<%= KMLOPString.ClientID %>').value !== "") {
var overlayPropertiesOP = {
"name": "Openations KML",
"url": document.getElementById('<%= KMLOPString.ClientID %>').value,
"type": MoW.protocols.KMLProtocol.TYPE.STRING,
"description": "Demonstrating KML overlay",
"mapTypeId": "google.map.mapTypeId.ROADMAP"
};
var newOverlayObjectOP = MoW.Factory.createKMLOverlay(overlayPropertiesOP);
map.addOverlay(newOverlayObjectOP, {
showAlert: true
});
}
if (document.getElementById('<%= KMLESString.ClientID %>').value !== "") {
var overlayPropertiesES = {
"name": "Exercises KML",
"url": document.getElementById('<%= KMLESString.ClientID %>').value,
"type": MoW.protocols.KMLProtocol.TYPE.STRING,
"description": "Demonstrating KML overlay",
"mapTypeId": "google.map.mapTypeId.ROADMAP"
};
var newOverlayObjectES = MoW.Factory.createKMLOverlay(overlayPropertiesES);
map.addOverlay(newOverlayObjectES, {
showAlert: true
});
}
});
}
function kmlBtnClick() {
var overlayProperties = {
"name": "Example KML Overlay",
"url": document.getElementById('<%= KMLESString.ClientID %>').value,
"type": MoW.protocols.KMLProtocol.TYPE.STRING,
"description": "Demonstrating KML overlay"
};
var newOverlayObject = MoW.Factory.createKMLOverlay(overlayProperties);
map.addOverlay(newOverlayObject, {
showAlert: true
});
map.setBasemap(google.maps.mapTypeId.ROADMAP);
}
</script>
modified 3-Feb-20 8:18am.
|
|
|
|
|
We're a small internal dev team and we have an .NET & AngularJS web site, except the site is supposed to act as a host of other sites/applications. So the users go to a single address, they can then get to the other apps via a dashboard, but the core site handles the 2 different authentications (windows and custom oracle database based) and other common features. Currently the .NET side is all separate projects for each app. The AngularJS is just one app.
Ideally we'd want the applications to be more independent, so that we could update one and be comfortable saying that regression testing of the others isn't needed.
Some guidance on:
How would you design the web side? I was thinking separate angular apps with the 'host' site using iframes? As I couldn't think of another way to keep the whole look and feel with out code duplication.
The authentication, its OAuth/Owin, the windows AD and Oracle are separate, but the same user could have creds for both. We've currently got two 'client_ids' in the single web app, which doesn't seem right, as I'm tracking two access_tokens. I'm thinking I could use OAuth claims instead.
We are also planning rewriting from AngularJS, would anyone recommend an alternative framework? I'm half thinking of Blazor, to reduce the number of languages the team needs to know, but obviously its still new, so the amount of resources about and its long term viability are risks.
Apologies for the rambling post
|
|
|
|
|
I'm trying to call a Web API hosted on my server from a Xamarin Forms app.
This Works
private string GetServerMessage()
{
var result = string.Empty;
using (var client = new WebClient())
{
client.Headers.Add("Content-Type:application/json");
client.Headers.Add("Accept:application/json");
result = client.DownloadString(url);
}
return result;
}
This Doesn't Work
It hangs on the Client.GetAsync line
private async Task<string> GetServerMessageAsync()
{
string response = string.Empty;
HttpClient client = new HttpClient();
client.BaseAddress = new Uri(url);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage responseMessage = await client.GetAsync(url);
if (responseMessage.IsSuccessStatusCode)
{
response = responseMessage.Content.ReadAsStringAsync().Result;
}
return response;
}
It the right way to call the Web API from Xamarin Forms? Why is the async calll hanging up?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
That's usually an indication that there's a deadlock trying to call back into the UI thread. That's often caused by using sync-over-async - waiting synchronously for an async task to complete.
I notice you're using .Result within your method to read the content, rather than await ing the task. You probably have other places in your code doing something similar.
Try adding .ConfigureAwait(false) to the async calls, and removing the .Result access:
private async Task<string> GetServerMessageAsync()
{
string response = string.Empty;
HttpClient client = new HttpClient();
client.BaseAddress = new Uri(url);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage responseMessage = await client.GetAsync(url).ConfigureAwait(false);
if (responseMessage.IsSuccessStatusCode)
{
response = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false);
}
return response;
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
As I have created a mock data in sevice.js but I want to handle the api by passing mock URL using webservice to close the activity using httpget method .
**View.html**
<a class="button is-danger is-outlined m-b-sm" ng-click="onActivityClose()" prevent> **Service.js**
activityClose: function (data) {
if (
data.projectActivity.original_value == data.projectActivity.estimated_end_value &&
data.projectActivity.original_value == data.projectActivity.revised_value &&
data.projectActivity.original_value == data.projectActivity.payment.total) {
var response = {
"status": false,
"message": null,
"reconcile_list": {
"variations": [
{
"id": 1,
"reference": "21.004",
"status": {
"code": "ENDORSED",
"label": "Endorsed"
},
"actioned_date": "2019-12-25 10:00:01"
}
],
"reconcile_sap_fec": {
"sap_po_value": 100000.01,
"fec_value": 90000
},
"reconcile_sap_payments": {
"sap_po_value": 100000.01,
"payment_value": 100000
}
}
};
return $q.resolve(['Success']);
}else{
$log.error('Action activity close returns undefined');
return $q.reject(['Unknown response!']);
}
},
**view.js**
onActivityClose: function() {
UTIL.confirm(
"<p>You are about to close a project activity .</p><p class='has-text-weight-bold'>" +
$scope.data.projectActivity.reference +
" " +
$scope.data.projectActivity.description +
"</p><p>Please confirm your action by clicking the appropriate button below.</p>"
).then(function(confirm) {
if (confirm) {
serviceFcrs.webservice
.activityClose($scope.data)
.then(function(_response) {
$scope.$emit(
"notify.success",
"Activity has been closed successfully"
);
if (
data.projectActivity.original_value == data.projectActivity.estimated_end_value &&
data.projectActivity.original_value == data.projectActivity.revised_value &&
data.projectActivity.original_value == data.projectActivity.payment.total) {
$scope.data.userCanCreatePayment= false;
$scope.data.userCanCreateVariation= false;
$scope.unlockButton= false;
$scope.closedButton= true;
})
.catch(function(error) {
$log.error(error);
});
$scope.$emit(
"notify.alert",
"<h1>Activity cant be closed</h1>: " + error
);
return false;
});
}
});
},
modified 15-Jan-20 6:11am.
|
|
|
|
|
I have edited your post so it is readable. But it is still missing any explanation of your problem. I suggest you add some details so people can try to help you.
|
|
|
|
|
Hello,
So I am currently struggling with PHP MVC model. I am tryng to write a simple app that will get user input from index.html (Name, surename, email) - Validate/sanitize input and insert the data in database. Return errors if any.
So I am currently failing to understand which file (Model, controller) is responsible for collecting the data from html form and inserting it into variables - example:
if (isset($_POST["submit_button"])) {
$username = ($_POST["username_input"]);
$password = ($_POST["password_input"]);
}
Where do these lines go? Is it a good practice to create a seperate .php file just to collect user input and pass it further? (to controller/model)
I can't create an additional class for this since, everything that is inside a class needs to be a function, but I cannot call a PHP function when submiting an HTML form.
Example:
class inputCatcher {
}
This won't work because it's a class and it needs a method.
Any ideas?
|
|
|
|
|
I am a backend developer using php(Laravel) to develop web applications having 2 years of work experience.Now I want to learn new technology either Angular or React.I don't know which one is having more future scope.can any one suggest me which one is better.
|
|
|
|
|
Member 14705443 wrote: which one is better. That will depend on your requirements; what is better for you may not be so for some other developer. As to which one has the best future, you need a crystal ball to foretell fortunes.
|
|
|
|
|
React is more meaningful in terms of the more modern JS developer stack. Angular allows you to use a more old-timey approach, but has its own challenges in terms of architecture. Both will have a bit of a learning curve.
I stopped using Angular when they claimed they would be releasing a new major version every 6 months. Screw that.
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
There is a considerable amount of debate going to find out which is the better choice for front-end development on whether AngularJS or ReactJS?
ReactJS and AngularJS both of them are robust development technologies. AngularJS is designed and managed by Google, while Facebook and its community members maintain ReactJS. These are built on JavaScript that enables advancement and customization to develop advanced web applications.
While both of them are quite popular front end frameworks, This article provides a comparison of how both AngularJS and ReactJS intends to solve the front-end challenges, along with differences in approach and philosophy.
|
|
|
|
|
Angularjs and reactjs both are the template of javascript.You cannot say on of them is no best. Main differences between Angularjs and Reactjs are following
The version of angularjs has been updated in march 2019 and the version of react js has been updated in october 2019. It means that the reactjs is latest from angularjs
Huge difference between both of them is that the author of reactjs is facebook and the author of angularjs is google.
These are the main differnce between angularjs and reactjs.
|
|
|
|
|
So I am currently trying to write an PHP function which updates fields within a table (mysqli database):
The code that I currently have in my PHP code function is:
public function insertValue($id, $attribute, $value){
try {
$stmt = $this->connect()->query("UPDATE attributes SET ".$attribute." = ".$value. " WHERE id = ".$id);
} catch (Exception $e) {
return $e->getMessage();
}
Where the parameters are being passed from another .php file:
if (isset($_POST['box2__submit'])) {
$id = $_POST['box2__userid-input'];
$attribute = $_POST['box2__attribute-input'];
$value = $_POST['box2__value-input'];
$DB = new db_class();
echo $DB->insertValue($id, $attribute, $value);
Now the problem is that everything works fine untill I pass a value that is letters for example passing - "Hello" with $value throws an error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Hello' in 'field list'
However if I pass values that are numerical, for example - 1337, it works just fine. I have no idea what's wrong and how can I fix this.
Help!
|
|
|
|