Páginas

Asp.Net Core + GraphQL + Docker + Github + AzureDevOps + SonarQube

This project was created to learn about GraphQL and to spread the learnings. You can find the related PPT http://bit.ly/NeorisGraphQLPPT

Project source code: https://github.com/vackup/AspNetCoreGraphQL/

The app runs on 2 docker containers, one for the React frontend and one for the Asp.Net Core GraphQL backend
The project is being built using Azure Devops build pipelines (http://devops.azure.com)




Continuous Code Inspection is being done by SonarQube (https://www.sonarqube.org/).
AspNetCoreGraphQL SonarCloud Dashboard https://sonarcloud.io/dashboard?id=vackup_AspNetCoreGraphQL


What's GraphQL?

GraphQL (https://graphql.org/) is a data query language and specification developed internally by Facebook in 2012 before being publicly open sourced in 2015.

It provides an alternative to REST-based architectures with the purpose of increasing developer productivity and minimizing amounts of data transferred.

GraphQL is used in production by hundreds of organizations of all sizes including Facebook, Credit Karma, GitHub, Intuit, PayPal, the New York Times and many more. https://graphql.org/users/

Some post for building GraphQL APIs with ASP.NET Core

Mi (primer) experiencia en las jornadas agiles latam 2019

En este post quiero compartir lo que tooooooooooodo lo que me dejo las jornadas Agiles Latam 2019 (https://twitter.com/agilesla) llevadas a cabo en mi ciudad Rosario, Argentina. Obviamente es un post que lo único que espera es aportar un granito de arena, no trata de ser perfecto, completo o excelente, simplemente aportar un poco de valor.

Sinceramente me llevo muchísimo más de lo que fui a buscar. Como siempre digo, las personas son todo!!! eso es lo más importante y lindo que me llevo... que hay muchísimos "locos" ahí afuera queriendo cambiar el mundo y trata de hacer de él un lugar mucho mejor! Ver como todo fluía con respeto y sinceridad, con ganas.. como las cosas se iban dando me voló la cabeza. Me llevo interacciones impresionantes, experiencias, charlas, demostrar que en mi ciudad se puede hacer evento de calidad internacional. Poder compartir con personas grosas de todo punto de vista cuya única finalidad era compartir su conocimiento, sea mucho o poco, pero solo compartir desinteresadamente.

Me fui con la cabeza aún más abiertas, yo siendo el mismo pero distinto a la vez, con muchas más ganas. Y debo confezar un gran cambio que ocurrió en mi: antes las actividades del tipo "habla con la persona que tenés al lado por 1 minuto de tal tema" las odiaba, me costaban y no les encontraba sentido. Hoy puedo decir que me encantan y cuando no hay de ese tipo de actividades, es como que me falta algo.

Manifiesto agiles latam

Dinámica de las charlas y agenda

Agenda completa https://agiles2019.sched.com/




Jueves

Del EGO sistema al ECO sistema




Del Egosistema al Ecosistema_RoseRestrepoV-TA.pptx

Desarrollo del liderazgo con #leadershipdancefloor



Empresas sin Jefes (Caso 10 Pines)

https://www.10pines.com/
  • No es cooperativa, es SRL, pero solo por figura pública, todo se decide entre todos. Toma de decisiones → Fue una evolución / iteración la forma en que se toman las decisiones de 6 a 80 empleados.
    • Decisiones triviales → usan Lumio (x ej: compra de cafeteras)
    • Decisiones importantes → pasaron del consenso (100% de acuerdo) a “nadie en desacuerdo” (quizá hay decisiones que no me importa y lo que decidan los demás me parece bien)
  • Reunión de roots (raíces, personas de más de 3 meses dentro de la compañia) para temas importantes
  • Números abiertos → todos saben todos los número de la compañía, sueldos incluidos y se autoregulan (ver próxima charla)
  • La mayoría son devs, sólo 3 de administración. Hay grupos que desempeñan funciones como x ej ventas, hardware, recruting, etc.
  • 50% de las ganancias se reparte como bono según fórmula (la fórmula la revisan todos los años)
  • Las personas que ingresan, están 3 meses sin asignación aprendiendo ya dentro de la empresa.
  • Todos los viernes los proyectos hacen tipo una daily global.
  • Aumentos de sueldos → cada uno se postula y necesita aval. Hubo casos de gente que rechazo el aumento porque consideraba que iba a ganar algo más que otro que consideraba que aportaba más
  • Confianza
  • Capacitación
  • Reunión anual donde se definen las cosas a hacer en el corto plazo, lo que quieren, lo que desean, retro general, etc

Receta para números abiertos en tu empresa (10 pines)

Viernes

Libros Latam

https://blog.nicopaez.com/2019/09/20/notas-de-la-sesion-de-libros-de-autores-latinoamericanos-en-agiles-2019/

https://docs.google.com/presentation/d/1ONsz-Wpjbl70nHyI2svpgy71_poepuvq8lnRs1dTo50/edit#slide=id.g34d96f1218_0_8

https://10pines.gitbook.io/desarrollo-de-software-agil-en-10pines/

Charlas para generar futuro




















Open space xxl

Historias de los abuelos (Ing y otros) & #EffectiveScrum Menos reuniones y mejores resultados

Learning GraphQL using NodeJS

Motivation and background

Trying to learn GraphQL (https://graphql.org/) I found the "Code Challenge for Scoutbase" (https://medium.com/scoutbase/we-are-hiring-javascript-developers-e7833762a40d).

The drawback of the challenge was that I've never done a nodejs app but as I knew JS and I have many many years of experience building web apps (mainly .net) and I love to learn new thing, I decided to go for it!

So I went from nothing (0) using NodeJs, GraphQL, Sequelize, PostgreSQL to this in just a couple of hours.

Here you have the code (it's an MVP or a prototype) and the code challenge description
https://github.com/vackup/scoutbase-code-challenge-back-end/

The app is deployed to Azure through Azure pipelines.



The app is using an Azure Database for PostgreSQL.

You can access the Graphql playground here https://scoutbase-code-challenge-backend.azurewebsites.net/graphql


Helpful links


Back-end task of Code Challenge for Scoutbase

This task is for demonstrating your understanding of HTTP, GraphQL, Node.js and general API practices.

Instructions:

  1. Implement a Node.js-based server with raw http, Koa or Express.
  2. Add a /graphql endpoint serving the apollo-server or any other GraphQL implementation.
  3. Schema must be able to return proper response for the following public query:
    • { movies { title year rating actors { name birthday country directors { name birthday country } } } }
  4. Add support for the following mutation:
    • mutation createUser($username: String, $password: String) { createUser(username: $username, password: $password) { token user { id name } } }
  5. To expand on the number four, add a mutation-based authentication that accepts:
    • mutation login($username: String, $password: String) { login(username: $username, password: $password) { token user { id name } } }
  6. Authenticated users may request additional fields for the query used earlier. New scoutbase_rating field must return the a random string between 5.0-9.0:
    • { movies { scoutbase_rating title year rating actors { name birthday country directors { name birthday country } } } }
  7. /graphql must be accessible for external clients.
  8. End.

fastlane snapshots and xamarin

As you all know, fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. It handles all tedious tasks, like generating screenshots, dealing with code signing, and releasing your application.You can use fastlane snapshots  to automate the process of capturing screenshots of your app. It allows you to:
  • Capture hundreds of screenshots in multiple languages on all simulators
  • Take screenshots in multiple device simulators concurrently to cut down execution time (Xcode 9 only)
  • Do something else while the computer takes the screenshots for you
  • Configure it once, and store the configuration so anyone on the team can run it
  • Generate a beautiful web page showing all screenshots on all devices. This is perfect to send to Q&A, marketing, or translators for verification
  • Avoid having loading indicators in your App Store screenshots by intelligently waiting for network requests to be finished
  • Get a summary of how your app looks like across all supported devices and languages
Here https://docs.fastlane.tools/getting-started/ios/screenshots/  you have all the necessary information to take the best screenshots you need.

Unfortunately for Xamarin users, snapshots uses UITests, which require an Xcode project so, Is there anything we can do to use snapshots with our Xamarin projects? 

The answer is short, YES YOU CAN!!!

Setting up you XCUITest project

UITest  does not use the project code to test, it exists outside the app. UITest instead looks at what is available in the simulator and returns to us instances of XCUIElement based on what it finds, XCUIElement and XCUIApplication are the proxies that are used for this.

So you only need to open XCode, go to FILE --> NEW --> PROJECT and select SINGLE VIEW APP, click the NEXT button and on the next screen, the most important thing, is that you check "INCLUDE UI TEST".
 

Now you have almost ready, just follow this information https://docs.fastlane.tools/getting-started/ios/screenshots/ to configure your project.

Xamarin app? How?

As explained here https://medium.com/xcblog/hands-on-xcuitest-features-with-xcode-9-eb4d00be2781 now XCUIApplication() has initialiser which takes bundleIdentifier so that we can pass bundleID of our app and has new activate() method to activate app from background. 

As you can see, you can interact with any app within Simulator or device as long as we know bundle identifier. This is huge improvement in UI testing of iOS apps. 

Guess what? You can interact with you Xamarin app as far as it's deployed in the simulator! You can install your Xamarin in the simulator as normal, I mean, just hitting the PLAY / DEBUG button on your Visual Studio for macOS.

Automate everything

But what if you can automate you Xamarin iOs deployment? I also have the answer! 

To install an iOs app from the command line you can use this command: xcrun simctl install

Where
  1. device can be the device UUID, its name, or booted which means the currently booted device
  2. path is the path of your .app. 

Get simulator device UUID

To get all your devices UUID, execute this command: xcrun instruments -s devices

For more information please visit https://developer.xamarin.com/guides/testcloud/calabash/working-with/identifying-ios-devices-and-simulators/ 

Get the path of your .app

It's in your build folder pathToYourAppSourceCode/bin/iPhoneSimulator/Debug/device-builds/iphone[build ios version]/appName.app. In case of my hypstr app, the location is here

Tying everything up

Create a bash script to automate app deploy to all your selected simulators (https://www.macobserver.com/tmo/article/os-x-how-to-convert-a-terminal-command-into-a-double-clickable-desktop-file)

eg:

#!/bin/bash

echo booting iphone 6 simulator
xcrun simctl boot E26FC3E7-DF91-49DF-AE9D-3A7443B849AD

echo deploying app
xcrun simctl install E26FC3E7-DF91-49DF-AE9D-3A7443B849AD pathToYourAppSourceCode/bin/iPhoneSimulator/Debug/device-builds/iphone[build ios version]/hypstr.UI.iOs.app

echo shutdown simulator
xcrun simctl shutdown E26FC3E7-DF91-49DF-AE9D-3A7443B849AD


More info on ios simulator commands https://medium.com/xcblog/simctl-control-ios-simulators-from-command-line-78b9006a20dc

As only these screens are needed for iPhone when submitting to App Store, just create the script to deploy to this four simulator:
  1. iPhone 7 Plus (5.5-Inch)
  2. iPhone 7 (4.7-Inch)
  3. iPhone 5 (4-Inch)
  4. iPhone X
Those simulators are the ones you need to specify in you Snapfile (snapshots config file)

Magic, magic, magic! 

Following this approach, I manage to take my screeshots for my Xamarin app called hypstr published in the App Store https://itunes.apple.com/us/app/hypstr/id650216315 using fastlane snapshots as you can see in the following image


Enjoy!

More info about fastlane, snapshots and XCUITest:




Implement async “fire and forget” HTTP triggers in azure functions

Inspired by "implement async “fire and forget” HTTP triggers in azure functions" (https://stackoverflow.com/questions/38123887/can-i-implement-async-fire-and-forget-http-triggers-in-azure-functions), I've created 2 Azure Functions

  1. Http Trigger function with queue message output
  2. Queue Trigger function.
They were created using VS 2017 Template and not from de Azure Portal.

Basically you fire the task doing a request to the first Azure Function. This Function leaves a message in a queue and the response the request. So your app continues to run normally (fire and forget).
Then, there is another Function that proccess that message. Hereinafter, you can check / notify the result however you want.


Source code in my github repo: https://github.com/vackup/QueueAzureFunctionApp

More info at:

Native iOS & Android Development for the C# Developer with Xamarin

En este curso de 4 días se intentará dar un pantallazo general sobre el mundo mobile, su distribución a nivel mundial, tips sobre que hace especial a esta plataforma y una introducción a Xamarin para el desarrollo de aplicaciones nativas tanto en Android como iOs.

El objetivo del curso, es que quienes participen sean capaces de entender todo lo que engloba al desarrollo mobile, y aquello que va más allá de la pantalla del mobile device.

Me quedan subir varios links con los videos y los archivos con  los materiales, ya los ire subiendo pero mientras tanto acá tiene las presentaciones

Xamarin iOS - apply gradient background to status bar and navigation bar

Here you have a running sample on  how to apply gradient background to status bar and navigation bar to Xamarin iOS https://github.com/vackup/StatusBarGradientBackground/



Info used:
How can I create a horizontal gradient background for my iOS nav bar?
http://stackoverflow.com/a/31901915/580229

Using Background Image in Navigation Bar
https://www.appcoda.com/customize-navigation-status-bar-ios-7/

How to programmatically get iOS status bar height
http://stackoverflow.com/a/16598350/580229