|
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
Optimizing the performance of large-scale web applications involves strategies at both the front-end and back-end:
Front-end Best Practices:
Minimize HTTP requests: Combine files like CSS and JavaScript to reduce requests. Use lazy loading for images and assets.
Use a Content Delivery Network (CDN): A CDN helps distribute your static assets across multiple servers for faster delivery.
Minification and Compression: Minify CSS, JavaScript, and HTML. Also, enable gzip compression for files sent over HTTP.
Browser Caching: Leverage browser caching to store static assets locally and reduce load times on repeat visits.
Back-end Best Practices:
Database Optimization: Index your database properly, avoid unnecessary queries, and cache frequently accessed data.
Load Balancing: Implement load balancing to distribute the workload across multiple servers to prevent any single server from overloading.
Asynchronous Processing: Offload tasks like sending emails, notifications, or heavy computations using background jobs and queues.
Optimize API Calls: Reduce the number of API calls and make batch requests where possible.
Combining these techniques ensures that your web application remains fast, scalable, and efficient as it grows.
|
|
|
|
|
I have what I thought was a fairly simple requirement, web site (blazor) that delivers a minimal membership service. No registration (this is done by a WPF app with 1-2 users).
Set up a web api to service the data and authentication requirements (done using JWT tokens)
And this is where the rabbit hole opens up!
Create a web app that gets its authentication from the web api and then service the data requirements. Every example i have found wants to use Entity this and Entity that with 7 different tables, registration, 2 factor security and password recovery, NONE of which I need.
All I need is to get an authenticated (email and password) token from the API and include that in each subsequent request header.
This already works perfectly for the WPF client but I cannot understand how it should be done for a blazor site. Any suggestions or examples would be appreciated.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I'm trying to make an API of my application using CodeIgniter 4 (PHP, Javascript), but when I clicked Send(in postman) with URL: http://localhost:8080/lampiran, it always showing '404 Not Found'(The requested resource /lampiran was not found). This is my controller :
class Lampiran extends ResourceController
{
protected $model = 'App\Models\lampiranModel';
protected $format = 'json';
public function index()
{
$data = [
'message' => 'success',
'data_lampiran' => $this->model->findAll()
];
return $this->respond($data, 200);
}
.....
and this is my route
$routes->get('lampiran', 'Lampiran::index');
|
|
|
|
|
Hi
I was wondering if I created a site while I am in France but my target are people in Canada. Hosting company in France gave me IP address for server in France but I want the site to be visible mainly for people in Canada . How I can do that ?
|
|
|
|
|
Geo-targeting: With geo-targeting methods, you can make your site visible to particular countries/regions. When it comes to the former, you can do this by setting location-based preferences in tools -- Google Search Console (also known as Webmaster Tools), using local domains (e.g., co. jp), and getting listed in local directories. uk,. fr), using (hreflang) tags, or appropriate meta descriptions for each language and region. You can also set up server settings for content delivery networks (CDNs) so that load times are optimized in a particular region. Local SEO strategies such as local keywords, and backlinks all further improve visibility in requested areas.
|
|
|
|
|
Thanks
What is local directories ?
what is hreflanfg tags ?
|
|
|
|
|
I'm currently implementing a web-based code editor into my web project (Project Chromosphere.com). I think some of you might be interested. It's a work in progress, but you can see it here: https://chromosphere.com/chromosphere/scripts/js/ui/sandbox/vsCode/[^]
I considered creating a web-based code editor from scratch. Then, I realized the amount of time and effort to embark on such a thing would be ridiculous. I don't want to spend 1000 hours developing a web-based code editor. So, I'm going with a third-party solution.
Microsoft VS Code[^] offers a good solution. The VS Code code editors are powered by the Monaco Editor[^]. That's the code editor that you are actually embedding into your web page.
To implement this web-based code editor in its most basic form is easy.
See the HTML document source code below:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Simple Example Code Editor</title>
</head>
<body>
<div id="container" style="width: 100%; height: 95.5vh; border: 1px solid grey;"></div>
<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.27.0/min/vs/loader.js"></script>
<script type="text/javascript">
require.config({
paths: { vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.27.0/min/vs" }
});
require(["vs/editor/editor.main"], function () {
var editor = monaco.editor.create(document.getElementById("container"), {
value: 'function hello() {\n alert(\'Hello World!\');\n}',
language: 'javascript'
});
monaco.editor.defineTheme("jScriptTheme", {
base: 'vs-dark',
inherit: true,
rules: [
{ token: '', foreground: 'aaaaaa' },
{ token: 'invalid', foreground: 'ff3333' },
{ token: 'emphasis', fontStyle: 'italic' },
{ token: 'strong', fontStyle: 'bold' },
{ token: 'variable', foreground: 'bbbbbb' },
{ token: 'variable.predefined', foreground: 'eeeeee' },
{ token: 'constant', foreground: 'f08c36' },
{ token: 'comment', foreground: '00bb00', fontStyle: 'italic' },
{ token: 'number', foreground: 'f08c36' },
{ token: 'number.hex', foreground: 'f08c36' },
{ token: 'regexp', foreground: '4dbf99' },
{ token: 'annotation', foreground: '41a6d9' },
{ token: 'type', foreground: '41a6d9' },
{ token: 'delimiter', foreground: 'cceeff' },
{ token: 'delimiter.html', foreground: '5c6773' },
{ token: 'delimiter.xml', foreground: '5c6773' },
{ token: 'tag', foreground: 'e7c547' },
{ token: 'tag.id.jade', foreground: 'e7c547' },
{ token: 'tag.class.jade', foreground: 'e7c547' },
{ token: 'meta.scss', foreground: 'e7c547' },
{ token: 'metatag', foreground: 'e7c547' },
{ token: 'metatag.content.html', foreground: '86b300' },
{ token: 'metatag.html', foreground: 'e7c547' },
{ token: 'metatag.xml', foreground: 'e7c547' },
{ token: 'metatag.php', fontStyle: 'bold' },
{ token: 'key', foreground: '41a6d9' },
{ token: 'string.key.json', foreground: '41a6d9' },
{ token: 'string.value.json', foreground: '86b300' },
{ token: 'attribute.name', foreground: 'f08c36' },
{ token: 'attribute.value', foreground: '0451A5' },
{ token: 'attribute.value.number', foreground: 'abb0b6' },
{ token: 'attribute.value.unit', foreground: '86b300' },
{ token: 'attribute.value.html', foreground: '86b300' },
{ token: 'attribute.value.xml', foreground: '86b300' },
{ token: 'string', foreground: 'd88bfc' },
{ token: 'string.html', foreground: 'd88bfc' },
{ token: 'string.sql', foreground: 'd88bfc' },
{ token: 'string.yaml', foreground: 'd88bfc' }
],
colors: {
'editor.background': '#000025'
}
});
monaco.editor.setTheme("jScriptTheme");
});
</script>
</body>
</html>
Below is the HTML document source for my Configured JavaScript code editor[^].
See the HTML document source code below:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Configured Example Code Editor</title>
</head>
<body>
<div id="container" style="width: 100%; height: 95.5vh; border: 1px solid grey;"></div>
<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.27.0/min/vs/loader.js"></script>
<script type="text/javascript">
require.config({
paths: { vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.27.0/min/vs" }
});
require(["vs/editor/editor.main"], function () {
var container = document.getElementById("container");
if (container !== null) {
container.style.width = "calc(100% - 2px)";
container.style.height = ((window.innerHeight) - 4) + "px";
container.style.overflowY = "hidden";
container.style.margin = "0";
container.style.padding = "0";
document.body.style.margin = "0";
document.body.style.padding = "0";
}
var editor = monaco.editor.create(document.getElementById("container"), {
value: "function hello(){\nalert('Hello world!');}",
language: "javascript",
theme: "vs-dark",
"autoIndent": true,
"formatOnPaste": true,
"formatOnType": true,
keywords: [
"break", "case", "catch", "class", "continue", "const",
"constructor", "debugger", "default", "delete", "do", "else",
"export", "extends", "false", "finally", "for", "from", "function",
"get", "if", "import", "in", "instanceof", "let", "new", "null",
"return", "set", "super", "switch", "symbol", "this", "throw", "true",
"try", "typeof", "undefined", "var", "void", "while", "with", "yield",
"async", "await", "of"
],
typeKeywords: [
"any", "boolean", "number", "object", "string", "undefined"
],
operators: [
"<=", ">=", "==", "!=", "===", "!==", "=>", "+", "-", "**",
"*", "/", "%", "++", "--", "<<", "</", ">>", ">>>", "&",
"|", "^", "!", "~", "&&", "||", "?", ":", "=", "+=", "-=",
"*=", "**=", "/=", "%=", "<<=", ">>=", ">>>=", "&=", "|=",
"^=", "@",
]
});
setTimeout(function () {
editor.getAction('editor.action.formatDocument').run();
}, 200);
monaco.editor.defineTheme('jScriptTheme', {
base: 'vs-dark',
inherit: true,
rules: [
{ token: '', foreground: 'aaaaaa' },
{ token: 'invalid', foreground: 'ff3333' },
{ token: 'emphasis', fontStyle: 'italic' },
{ token: 'strong', fontStyle: 'bold' },
{ token: 'variable', foreground: 'bbbbbb' },
{ token: 'variable.predefined', foreground: 'eeeeee' },
{ token: 'constant', foreground: 'f08c36' },
{ token: 'comment', foreground: '00bb00', fontStyle: 'italic' },
{ token: 'number', foreground: 'f08c36' },
{ token: 'number.hex', foreground: 'f08c36' },
{ token: 'regexp', foreground: '4dbf99' },
{ token: 'annotation', foreground: '41a6d9' },
{ token: 'type', foreground: '41a6d9' },
{ token: 'delimiter', foreground: 'cceeff' },
{ token: 'delimiter.html', foreground: '5c6773' },
{ token: 'delimiter.xml', foreground: '5c6773' },
{ token: 'tag', foreground: 'e7c547' },
{ token: 'tag.id.jade', foreground: 'e7c547' },
{ token: 'tag.class.jade', foreground: 'e7c547' },
{ token: 'meta.scss', foreground: 'e7c547' },
{ token: 'metatag', foreground: 'e7c547' },
{ token: 'metatag.content.html', foreground: '86b300' },
{ token: 'metatag.html', foreground: 'e7c547' },
{ token: 'metatag.xml', foreground: 'e7c547' },
{ token: 'metatag.php', fontStyle: 'bold' },
{ token: 'key', foreground: '41a6d9' },
{ token: 'string.key.json', foreground: '41a6d9' },
{ token: 'string.value.json', foreground: '86b300' },
{ token: 'attribute.name', foreground: 'f08c36' },
{ token: 'attribute.value', foreground: '0451A5' },
{ token: 'attribute.value.number', foreground: 'abb0b6' },
{ token: 'attribute.value.unit', foreground: '86b300' },
{ token: 'attribute.value.html', foreground: '86b300' },
{ token: 'attribute.value.xml', foreground: '86b300' },
{ token: 'string', foreground: 'd88bfc' },
{ token: 'string.html', foreground: 'd88bfc' },
{ token: 'string.sql', foreground: 'd88bfc' },
{ token: 'string.yaml', foreground: 'd88bfc' }
],
colors: {
'editor.background': '#000025',
}
});
monaco.editor.setTheme('jScriptTheme');
});
</script>
</body>
</html>
|
|
|
|
|
You should probably post this as a tip rather than a message in a forum that will soon be buried on page 42.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I wrote a function in JavaScript that creates synthetic events to simulate a full mouse event. What I mean by "full" is that I'm creating and dispatching the "mouseenter", "mouseover", "mousemove", "mousedown", "mouseup", "click", and "mouseout" events.
In what order do the "mouseenter", "mouseover", and "mousemove" events occur? I've tried looking this up, but I'm not getting anything.
|
|
|
|
|
Why not try it yourself and see?
Edit fiddle - JSFiddle - Code Playground[^]
In Firefox, I get over , then enter , then move . But if the precise order isn't documented anywhere, then it's probably not defined, and any code that relies on a specific sequence is most likely broken and wrong.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Just to add to what Richard said, you should read up on what these events actually do. Then your code will be less order dependent and more so intent dependent - even if they are synthetic. JavaScript really isn't a sequential kinda language anyway, despite its single execution thread.
The mouseover event triggers when the mouse pointer enters the div element and its child elements.
The mouseenter event is only triggered when the mouse pointer enters the div element.
The mousemove event triggers every time the mouse pointer is moved over the div element.
If you're writing code that performs entry logic on both enter and over, for instance, your code is probably running too slow.
W3C Schools sucks, but this demo should convey some concepts ok-ish.
Mouse Enter vs Over vs Move
Jeremy Falcon
|
|
|
|
|
how do you use Draggable events with read start and end dates from the event and fix them but choose resource?
<pre lang="text"><pre lang="Javascript">
<pre><script id="rendered-js">
document.addEventListener('DOMContentLoaded', function () {
var date = new Date()
var d = date.getDate(),
m = date.getMonth(),
y = date.getFullYear()
var Calendar = FullCalendar.Calendar;
var containerEl = document.getElementById('external-events');
var checkbox = document.getElementById('drop-remove');
var Draggable = FullCalendarInteraction.Draggable;
new Draggable(containerEl, {
itemSelector: '.external-event',
eventData: function (eventEl) {
return {
id: eventEl.getAttribute('data-id'),
title: eventEl.getAttribute('data-title'),
start: eventEl.getAttribute('data-start'),
end: eventEl.getAttribute('data-end'),
resourceId: eventEl.getAttribute('data-resource-id'),
description: eventEl.getAttribute('data-description'),
backgroundColor: window.getComputedStyle(eventEl, null).getPropertyValue('background-color'),
borderColor: window.getComputedStyle(eventEl, null).getPropertyValue('background-color'),
textColor: window.getComputedStyle(eventEl, null).getPropertyValue('color')
};
}
});
let calendarEl = document.getElementById('calendar');
let calendar;
let start = '2024-05-01';
let end = '2024-06-31';
let resourcesurl = '/resources';
let zone = '{{$zone}}';
let available = '{{$available}}';
let resourcesIndex = 0;
if (zone === '1') {
resourcesIndex += 1;
if (resourcesIndex === 1) {
resourcesurl += '?zone=on';
} else {
resourcesurl += '&zone=on';
}
}
if (available === '1') {
resourcesIndex += 1;
if (resourcesIndex === 1) {
resourcesurl += '?available=on';
} else {
resourcesurl += '&available=on';
}
}
u/foreach ($Branches as $key => $branch)
@isset($data['BranchChoose'.$key])
resourcesIndex += 1;
if (resourcesIndex === 1) {
resourcesurl += '?BranchID' + {{$key}} + '=' + {{$data['BranchID'.$key]}} + '';
} else {
resourcesurl += '&BranchID' + {{$key}} + '=' + {{$data['BranchID'.$key]}} + '';
}
@endisset
@endforeach
calendar = new FullCalendar.Calendar(calendarEl, {
plugins: ['interaction', 'resourceTimeline'],
timeZone: 'UTC',
defaultView: 'resourceTimelineDay',
aspectRatio: 1.5,
header: {
left: 'prev,next',
center: 'title',
right: 'resourceTimelineDay'
},
views: {
resourceTimelineDay: {
duration: {days: 10},
slotDuration: '{{$plus}}'
}
},
now: '{{$start_str_now}}',
editable: true,
droppable: true,
resourceLabelText: '@lang("Car Plate Number")',
resources: resourcesurl,
events: '/events?days=10&date={{$start_str_now}}',
eventRender: function (info) {
var eventObj = info.event;
var start = eventObj.start;
var end = eventObj.end;
var title = eventObj.title;
console.log('Event: ' + title + '\nStart: ' + start + '\nEnd: ' + end);
info.el.querySelectorAll('.custom-icon').forEach(function (icon) {
icon.remove();
});
let titleEl = '';
if (info.event.extendedProps.icons) {
titleEl = info.el.querySelector('.fc-title');
info.event.extendedProps.icons.forEach(function (iconData) {
var icon = document.createElement('span');
icon.classList.add('custom-icon');
icon.innerHTML = iconData.html;
icon.setAttribute('title', iconData.tooltip);
titleEl.parentNode.insertBefore(icon, titleEl);
});
}
if (info.event.extendedProps.tooltip) {
info.el.querySelector('.fc-title').setAttribute('title', info.event.extendedProps.tooltip);
}
{{--console.log('Event id:',info.event.id);--}}
{{--$.ajax({--}}
{{-- url: '/calendar/ID',--}}
{{-- method: 'POST',--}}
{{-- data: {--}}
{{-- id: info.event.id,--}}
{{-- resourceId: info.event.id,--}}
{{--
{{--
{{-- _token: '{{ csrf_token() }}'--}}
{{-- },--}}
{{-- success: function(response) {--}}
{{--
{{-- var newStart = response.start;--}}
{{-- var newEnd = response.end;--}}
{{-- info.event.setStart(newStart);--}}
{{-- info.event.setEnd(newEnd);--}}
{{-- console.log('Event newstart:',newStart);--}}
{{-- console.log('Event newend:',newEnd);--}}
{{-- },--}}
{{-- error: function (xhr) {--}}
{{-- info.revert();--}}
{{-- }--}}
{{--});--}}
if (info.event.start && info.event.end) {
console.log('Event start:',info.event.start);
console.log('Event end:',info.event.end);
var duration = moment(info.event.end).diff(moment(info.event.start), 'hours');
var durationEl = document.createElement('span');
durationEl.classList.add('event-duration');
durationEl.innerText = `(${duration} hrs)`;
titleEl = info.el.querySelector('.fc-title');
if (titleEl) {
titleEl.appendChild(durationEl);
} else {
var timeEl = document.createElement('div');
timeEl.classList.add('fc-title');
timeEl.appendChild(durationEl);
info.el.appendChild(timeEl);
}
}
console.log('Event ID:', info.event.id);
console.log('Event ID:', 222222);
},
dateClick: function (info) {
var selectedDate = info.dateStr;
var elements = document.querySelectorAll('.fc-daygrid-day[data-date="' + selectedDate + '"]');
elements.forEach(function (element) {
element.style.backgroundColor = 'lightgreen';
});
console.log('Event ID:', 111111);
},
eventDidMount: function (info) {
let element = info.el;
let originalBackground = element.style.backgroundColor;
element.addEventListener('mouseover', function () {
element.style.backgroundColor = 'lightgreen';
});
element.addEventListener('mouseout', function () {
element.style.backgroundColor = originalBackground;
});
},
drop: function (info) {
if ($('#drop-remove').is(':checked')) {
info.draggedEl.parentNode.removeChild(info.draggedEl);
}
},
eventReceive: function(info) {
var event = info.event;
console.log('Event ID:', event.id);
$.ajax({
url: '/calendar/update',
method: 'POST',
data: {
id: event.id,
resourceId: event.getResources()[0].id,
_token: '{{ csrf_token() }}'
},
success: function (response) {
alert(response.success);
calendar.refetchEvents();
},
error: function (xhr) {
info.revert();
}
});
},
eventDrop: function (event, delta, revertFunc) {
$.ajax({
url: '/calendar/update',
method: 'POST',
data: {
id: event.event.id,
resourceId: event.event._def.resourceIds[0],
_token: '{{ csrf_token() }}'
},
success: function (response) {
alert(response.success);
},
error: function (xhr) {
revertFunc();
}
});
},
});
calendar.render();
$('.fc-event').mouseenter(function () {
$(this).addClass('fc-event-hover');
});
$('.fc-event').mouseleave(function () {
$(this).removeClass('fc-event-hover');
});
$('#external-events .external-event').each(function () {
$(this).draggable({
zIndex: 999,
revert: true,
revertDuration: 0,
helper: function () {
var title = $(this).text().trim();
return $('<div class="fc-event">').text(title);
},
start: function (event, ui) {
var eventData = {
id: $(this).attr('data-id'),
title: $(this).text().trim(),
start: $(this).attr('data-start'),
end: $(this).attr('data-end'),
resourceId: $(this).attr('data-resource-id'),
description: $(this).attr('data-description'),
backgroundColor: window.getComputedStyle(this, null).getPropertyValue('background-color'),
borderColor: window.getComputedStyle(this, null).getPropertyValue('background-color'),
textColor: window.getComputedStyle(this, null).getPropertyValue('color')
};
$(this).data('eventData', eventData);
}
});
});
});
</script>
<pre lang="HTML">
<pre><script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<div class="card">
<div class="card-header">
<h4 class="card-title">Draggable Events</h4>
</div>
<div class="card-body">
<div id="external-events">
<!-- PHP loop to generate draggable events -->
@foreach ($events as $event)
<div class="external-event"
id="event_{{ $event->id }}"
data-id="{{ $event->id }}"
data-title="{{ $event->title }}"
data-start="{{ $event->start }}"
data-end="{{ $event->end }}"
data-resource-id="{{ $event->resourceId }}"
data-description="{{ $event->description }}"
style="background-color: {{ $event->color }}; color: white;">
{{ $event->title }}
</div>
@endforeach
<div class="checkbox">
<label for="drop-remove">
<input type="checkbox" checked="checked" readonly id="drop-remove">
remove after drop
</label>
</div>
</div>
</div>
</div>
|
|
|
|
|
I have a web api that services both wpf and browser clients. WPF only requires and ApiKey built into the application while the web will require authentication and authorisation (using JWT bearer tokens).
If so does anyone have an example.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I have a really simple API and see no need to implement open API except I want to host it on Azure (where my 2 table database is hosted). The overhead and learning curve for swagger is greater than the API learning curve.
So is it possible to host a non Open API on azure.
[edit]Search co pilot for "do I need open api to publish to azure" - the answer is no you do not need it. [/edit]
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
modified 14-Jun-24 18:20pm.
|
|
|
|
|
I'm a long-term web developer, used to building web-based applications in ASP.Net and using CSS, semantic markup, Javascript, AJAX and dynamically-generated content at the server. I'm happy hand-coding CSS and crafting HTML using classes, defining grids, floats etc. etc..
I've recently been "commandeered" by a charity I volunteer with to assist their overworked webmaster. Their website is primarily static pages, and end-users can add blog entries for specific categories. There's no server-side form processing involved. BUT the site is running on the WIX platform. It is possible to write page-specific CSS, but it won't do you much good as WIX generates its own HTML from your definitions of strips, sections, text etc - and doesn't let you add classnames or element IDs.
The webmaster reckons WIX is the bees-knees and claims that "Wix is probably the leading web platform around today. ... Wix is truly state of the art and the market leader." He also claims that it generates "responsive pages" - but the "responsiveness", such as it is, is done at the server. This means if you open a page on a mobile phone, then turn it into landscape, the page doesn't re-flow or re-structure; it just makes everything bigger to fill the width. This is NOT my understanding of "responsive design"...
I'm curious as to others' opinion of Wix, and whether I'm missing something obvious, or am way behind the web design trend.
|
|
|
|
|
DerekT-P wrote: probably the leading web platform around today. ... truly state of the art and the market leader.
Never heard of it, but based on that quote, it sounds like the webmaster has swallowed their marketing department's entire supply of BS.
According to Wikipedia[^], they have previously been caught stealing code from WordPress without complying with the license. They've also deleted websites at the request of the Chinese government, and fired an employee for being critical of Israel. So probably not the most trustworthy of companies then.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: they have previously been caught stealing code from WordPress without complying with the license. They've also deleted websites at the request of the Chinese government, and fired an employee for being critical of Israel. So probably not the most trustworthy of companies then. Holy crap. Never knew any of this. So... might be time to rethink recommending them to smaller website owners.
Jeremy Falcon
|
|
|
|
|
DerekT-P wrote: I'm a long-term web developer, used to building web-based applications in ASP.Net and using CSS, semantic markup, Javascript, AJAX and dynamically-generated content at the server. I'm happy hand-coding CSS and crafting HTML using classes, defining grids, floats etc. etc.. It sounds like you know what you're doing.
DerekT-P wrote: BUT the site is running on the WIX platform. Oh, my...That's awful. I am so sorry to hear this.
DerekT-P wrote: The webmaster reckons WIX is the bees-knees and claims that "Wix is probably the leading web platform around today. ... Wix is truly state of the art and the market leader." Were you able to keep from laughing when he told you this? What market is he referring to? The local flea market? That's like saying "Notepad" is the industry standard IDE for software development.
I've never encountered a web design editor that improved the quality of my work or allowed me to develop more quickly. I remember using Dreamweaver back when Macromedia owned it. It was such a hassle to do the simplest of things and all it did was get in the way. Then we had NetObjects Cold Fusion. That was just as useless. However, I could say that if a person wants to throw together a cookie-cutter website, and they have no experience whatsoever in this field, then it's probably a great tool.
The thing to remember is that the tool is only as good as the person who uses it. Imagine what Pablo Picasso could do with a box of crayons. Compare that to someone without artistic talent using the most advanced digital art application out there. I'm talking about "Corel Painter". With great accuracy, it simulates the appearance and behavior of traditional media, such as oil painting, pastels, graphite, airbrush, pen and ink, and the list goes on.
Could Pablo Picasso do more with crayons than someone who lacks artistic talent and uses the most advanced tools out there? My money is on Picasso and his crayons every time.
This unfortunate "webmaster" is out of touch with reality. Does he share his other beliefs with you? If so, do those beliefs defy reality? He may have a serious condition. Such a condition could cause him harm.
In the most severe cases, people who undergo this type of psychotic break from reality exhibit delusions of grandeur. An afflicted person might believe they can fly and jump off the roof of a building.
It may start off with using WIX, but that could lead to using things such as Microsoft Edge. Once a person starts using something like that, it's only a matter of time until they start using crack, and Python.
Friends don't let friends use WIX.
|
|
|
|
|
|
DerekT-P wrote: The webmaster reckons WIX is the bees-knees and claims that "Wix is probably the leading web platform around today. ... Wix is truly state of the art and the market leader." Anyone who drops buzzword nonsense like that is not a legit professional. At beast he's been hanging around too many business types and his ego makes him think he knows all about the web or he's just flat-out incompetent. Either way, saying crap like that is amateur hour.
That being said, nothing wrong with WIX. It's not the holy grail home dude pretends it is. But, it does have its place. It's great for people that just want to throw together a simple site or mom and pop shops who don't need anything hard core and just want to put a web page up. It'll never replace custom work or heavy lifting, but it can be a great way to get people started with their own site and maybe do a little ecom or put a family photo album online, etc.
Just know the market it serves. If you're a professional web dev even, and don't want to spend your time working on volunteer sites (like this), it's great. If they need anything with more custom power, they can pay for custom dev work. But, most folks just starting out can't afford that. So, I'm a fan of WIX. Just know its market and don't believe some dude with an ego.
Jeremy Falcon
|
|
|
|
|
I configured my website in IIS to use Windows Authentication, and it works when I don't try to add Authorization Rules.
However, I added an Allow rule to allow only users in the Administrators group, and it gives the below error when attempting to load the page:
HTTP Error 500.19 - Internal Server Error
Quote: Cannot add duplicate collection entry of type 'add' with combined key attributes 'users, roles, verbs' respectively set to ', Administrators, ' This is what my web config looks like:
<security>
<authorization>
<remove users="*" roles="" verbs="" />
<add accessType="Allow" users="" roles="Administrators" />
</authorization>
</security>
Can anyone see what I'm doing wrong?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
That matches the configuration sample in the documentation:
Security Authorization <authorization> | Microsoft Learn[^]
Based on the error, it sounds like you have authorization rules configured further up the hierarchy - either a parent folder, a parent application, or machine-wide. You could try using IIS Manager to look at the configured rules, using the "Authorization Rules" option in the IIS group rather than the ".NET Authorization Rules" in the ASP.NET group.
As a brute-force approach, you could clear the rules first:
<security>
<authorization>
<clear />
<add accessType="Allow" users="" roles="Administrators" />
</authorization>
</security>
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks, Richard. I didn't realize the multilayered nature of the settings.
I made sure that the settings on the server, website and application were all the same, and now it works.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|