« first day (3306 days earlier)      last day (1649 days later) » 

2:02 PM
Guys
I understood that xamarin can display local webpages
but
what about mobile's features
 
@Developer00 Xamarin has libraries wrapping native mobile APIs, yes.
 
It depends if you're on about xamarin.forms or xamarin.android
 
Do you guys offend code in debug mode when working with an large graph?
 
For example, because Xamarin.Android is basically just the entire android SDK but in C#
 
@CaptainObvious forms
@AvnerShahar-Kashtan So
The app start
it gets webpages from server
for the UI
 
2:06 PM
@juanvan Do we what now?
 
I offend people, not code.
 
@juanvan my code offends often
 
and how can I call a function when the user presses on some button in the page?
 
@Developer00 Why are you using a webpage as a UI?
 
I'm confused
 
2:06 PM
I think he meant "often" and not "offend"
 
yeah yeah
 
Because xamarin forms UI lacks on many things
 
but the real question is will we ever get a bot like caprica again ?
 
Like what
 
@Developer00 Your Xamarin app hosts a WebView which shows the UI. You can hook up a listener in your Xamarin C# that listens to script events in the JS.
 
2:07 PM
A simple way to handle images
 
For inspiration, @Developer00, this is my Xamarin pipeline: github.com/Deathspike/pipeline/tree/xamarin
I build company apps with that. UI is a web SPA, with native back-end.
 
Oh wait
But the app is not a single page
 
So build it as one ~_~
 
How
It's like an ecommerce
with customization
 
Have you ever built a SPA, like, ever?
 
2:10 PM
is simple
get a page
 
Or an ecommerce system like ever
 
I've never built an app
 
Write Single on the page
done
 
Oh it's you
 
like
 
2:10 PM
Yeah
Stop trying massive projects
 
It's my very first job
I have to
 
You'll hate the massive wall of shit to learn, decide programming is too hard and quit
 
So inspiring.
 
I'm working on small projects
 
then you ll go into IT support like i did
thinking its better just to realize it's a total sh.tshow
and wish yourself back into a programming job
 
2:12 PM
What can I do guys
 
So.. a SPA is a way to build an app. It doesn't mean "There are no pages", it just means that every component of the app is contained in one file, and it doesn't follow a traditional request/response manner. Because if you do that... and you're offline... you can't display ANYTHING because the requests just fail.
A SPA prevents all that.
For example... see my hobby app github.com/mangaloyalty/mangaloyalty. It has some screenshots. Those are clearly different pages, but... it's a SPA, meaning when you load the app, it already knows how to layout all different pages and just makes data requests.
Does that make sense?
 
Another example is something like Twitter or facebook, it never properly reloads the page
 
Oh, yeah, obviously. I forgot about those things lol
YouTube doesn't ever reload either.
 
So, basically
Once the app is downloaded it has everything in it
It just displays things differently
based on something
How do you achieve that
Like
 
Yes. A mobile app must always be designed to be self-contained. It may have to ask for DATA online (what products are for sale, how much are they, is it in stock) but NEVER how the DATA IS DISPLAYED.
It already knows how to display the data.
 
2:16 PM
I haven't touched XF in a while so I don't know if there's a better way by now, but the method to call the C# host from JS is to create a URL that maps to your C# call - say, "http://fake-myhost?param=x", etc. From your host, you catch the Navigating event, see if it's in the format of a call, and if so, extract hte parameters, call the function, and cancel the navigation.
 
Yeah but
 
Once you have that disconnect, then "being offline" means just remembering the data you asked last time and showing that instead of current data. :P
 
isn't it like writing xaml pages inside the app
and passing the data to them
 
@AvnerShahar-Kashtan That's basically what I do, except I use console.logs for it harr harr
 
@CaptainObvious You mean its supposed to stop?
 
2:17 PM
HAMMERTIME!
4
 
How do you write components
Sorry if I'm this dumb
 
@Developer00 When you're writing XAML, you have a clear separation between the layout (in XAML, compiled and deployed to the client) and the data (which the code pulls in). With HTML, classically speaking, both the layout and the data are on the server, and every time you navigate, you have to get both. SPA simply means pulling the client code once, and from there on, it's all data.
 
Mobile dev is like a totally new world to me
 
writer.Write("components");
 
2:18 PM
c - o - ..
 
@Developer00 Components are actually a huge hole in web development. There isn't a standard way to write reusable components. Frameworks like React or Angular each have their own way of doing it, but vanilla JS/HTML? Nope.
 
@AvnerShahar-Kashtan But I have to use xamarin forms
@RoelvanUden suggested me to wrap everything in a webview
 
stop
 
HAMMERTIME!
 
But from the webview I can't use the phone's gallery/camera
I'm so darn confused
I'm facing some sort of internal crysis about programming
 
2:22 PM
When I call an async void method from a sync method, does it wait for it?
 
It's so disappointing
 
I need to use async Task to wait for it, dont I?
And it's actually an async method calling it
 
@Squirrelkiller An Async method is simply a method that returns a Task. When you call it from a sync method, it will return the first time it hits an "await" call, returning a Task.
 
But async void? Is it basically a fire-and-forget Task?
 
@Squirrelkiller Yes, and as such, explicitly recommended against.
The only reason it's supported is as a hack to allow attaching async methods to old event handlers, like OnClick.
 
2:28 PM
I thought that's why we have Task.FromCallback or something
 
async void is, actually, async Task behind the scenes, but that Task isn't available to you.
 
Task.FromAsync I think actually
 
@Squirrelkiller Let's say you have a button with <Button Click='ClickHandler'>, and now you want ClickHandler to be async - changing it to a Task means your XAML no longer works.
That's why it's an ugly hack.
 
AH I see
Top-Level viewmodel method
 
Ugly codebehind method.
 
2:31 PM
@Developer00 JS can use camera/gallery
 
Not inside a webview
I've tried
 
@AvnerShahar-Kashtan I have a big graph from importing a text file into an object.
 
Yes, just add a file input
 
It shows me "No application is able to perform this action"
 
Boom,, gallery/photos
 
2:34 PM
Now I have to work with that graph of data to etl it into a DB
 
@CaptainObvious ?
I hate that thing
It's like I can't do anything
 
Don't drown
 
He's gonna drown
 
I'm back from lunch
 
it's so stressfull
@HéctorÁlvarez hi
 
2:41 PM
@Developer00 Did you get the OS permissions for it?
 
I ate so much I feel like a balloon.
 
read/write external storage and internet+
 
So request camera permissions before trying to open a camera inside the webview
 
But my boss told me to take the afternoon and do whatever I want because he didn't actually believe it was possible to pass a certification test after studying for only 2 weeks.
 
Then it'll work.
 
2:42 PM
So he has no stuff for me to do at the moment
 
lol well that will teach him
DOn't make me be a better employee on a bet
 
I mean it was nothing too hard, just a display of memorizing, which I've grown to embrace after years of Visual Basic hacks to work with modern interfaces.
I probably won't be using 90% of what I've answered in that test
 
VB6?
 
Yes that's what I used to do
 
Can we be VB6 Friends??? :=]
 
2:46 PM
I endured my share, if someone ever tries to put that in my face i'll shove it up their asses
 
@RoelvanUden Still nothing
 
I must admit sometimes it was fun. Like teleporting a hacked combo-box into a grid and rebinding it to different data rows to make it look like we had an interactive table.
 
@Developer00 You got it tested in this short time? How?
 
@HéctorÁlvarez sure, if your idea of fun is poking your eyeball with pins and needles, I can see why that would be fun
 
@RoelvanUden it's an empty app with a webview
and some permission into the android manifest
 
2:48 PM
Ya it's nothing that hard - tho it would be nice to learn how to load some images in the background of a separate load function
 
But today was more along the lines of "Select the correct option for the shared public repository default path: <80-character-long-path>\<option>"
1. rcrepo
2. pubrepo
3. shared
4. public
 
@Developer00 And did you write the code to request the permissions?
 
@Neil I mean it was a fun thing to do, to rebind controls on the fly and making them blend with the other stuff. Far from maintenance of broken spaguetti code.
 
@RoelvanUden I thought you meant adding permissions to android manifest
 
my friend at work started off programming in visual basic
He said that it was insanely difficult to do something if there was no support for it
I believe him
 
2:50 PM
@Developer00 That's not how Android works. The permissions in the manifest just tell the OS which permission REQUESTS are allowed. You still need to ask the user to access the camera.
Otherwise every app that you ever installed that has a declaration can access your camera whenever.
Luckily that's not how it works (anymore).
 
how can I link the action on the webview to some c# code
I haven't found much docs about that
 
Using a bridge method; however you do it is up to you since there's nothing pre-made in Android/iOS to bridge the gap.
In the code I linked earlier I implemented a way to communicate using console.log.
 
omg I feel so dumb
 
But to test this you can just request camera permissions before showing the webview
 
like, I never ever did anything for mobile
and I don't even like it
 
2:53 PM
Mobile is a steep learning curve. It's very steep.
Well, be happy you're not writing two native apps! :D
 
> But don't be alarmed, alright? Although, if you do feel alarm, try to hold onto that feeling because that is the proper reaction to being told you have brain damage.
 
@Neil It is, and guses what, there's usually none
 
@HéctorÁlvarez he's a java programmer now. I guess he's a glutton for punishment
 
@RoelvanUden If I fail with xamarin I'll have to
 
@Developer00 Let me tell you right now, native is way harder than Xamarin.
Way, way, way, way harder.
 
2:55 PM
And Xamarin is way harder than desktop and Web
 
I prefer web develop
 
But not like meme html shit
 
That's why I use web with Xamarin for native things on mobile.. it's the easiest combination I've found.
 
It sounds like I'm a newbie
 
2:56 PM
Like actual web apps
 
yeah, just make an app that's essentially a browser
 
I've designed and written some landing pages for my company
 
then go web development all the way
 
I like them a lot
 
I created our company's warehouse app (which runs on exclusively 1 model of Zebra android device) in Xamarin forms
 
2:56 PM
@Developer00 It sounds like you've developed a single skill set and don't quite yet realize how much more is out there :-D
 
@RoelvanUden I've studied a couple languages at school
 
If you're familiar with Web, I'd suggest trying to develop a web application
 
@CaptainObvious I can't
My boss wants me to stick with xamarin
 
@Developer00 Programming languages are just the icing on the cake that is the environment.
Programming languages are easy.
 
If you insist on doing this ecommerce platform thing, Try creating something where you can create items
 
2:58 PM
Sorry 'bout that.
 
I guess it's my fault
 
 
Building good systems is hard, the language you use for that is not that important
 
Creating an Item catalog where you can view, edit, etc items (make them complex for extra points) should be a good start
 
Yeah.. as always.. start simple.
 
2:59 PM
I'm working on a simple app that displays images+
 
Start with the essentials. In this case, you need a server with a catalogue. Start there.
 
and lets me move them around a frame
 
Then build APIs to get data to an app.
 
Simple and App do not go together
 
Then build a SPA that uses those APIS.
And THEN build an actual app.
 

« first day (3306 days earlier)      last day (1649 days later) »